Skip to content

Commit

Permalink
Merge pull request #496 from mindstellar/release/5.2.0
Browse files Browse the repository at this point in the history
Release/5.2.0
  • Loading branch information
navjottomer committed Apr 28, 2024
2 parents 561833c + 6d48aad commit c91713b
Show file tree
Hide file tree
Showing 276 changed files with 6,624 additions and 11,863 deletions.
10 changes: 0 additions & 10 deletions .bump

This file was deleted.

53 changes: 53 additions & 0 deletions .docker/php-fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Custom PHP-FPM image with PHP extensions and Composer
FROM php:8.3-fpm-alpine
LABEL maintainer="navjottomer@gmail.com"

# Download script to install PHP extensions and dependencies
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions

RUN apk add --no-cache \
coreutils \
curl \
git \
zip unzip \
# iconv, mbstring and pdo_sqlite are omitted as they are already installed
&& PHP_EXTENSIONS=" \
amqp \
bcmath \
bz2 \
curl \
calendar \
event \
exif \
fileinfo \
gd \
gettext \
intl \
ldap \
mcrypt \
memcached \
memcache \
mysqli \
opcache \
redis \
soap \
sockets \
xsl \
zip \
" \
&& install-php-extensions $PHP_EXTENSIONS
# Install Composer.
ENV PATH=$PATH:/root/composer/vendor/bin \
COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/root/composer
RUN cd /root \
# Download installer and check for its integrity.
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \
&& sha384sum --check composer-setup.sha384sum \
# Install Composer 2.
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer --2 \
# Remove installer files.
&& rm /root/composer-setup.php /root/composer-setup.sha384sum
CMD ["php-fpm"]
2 changes: 1 addition & 1 deletion .docker/php-fpm/php-ini-overrides.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
upload_max_filesize = 100M
post_max_size = 108M
sendmail_path = /usr/bin/mhsendmail --smtp-addr mailhog:1025
sendmail_path = '/usr/sbin/sendmail -t -i -S mailhog:1025'
131 changes: 93 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,103 @@
# GitHub Action for Osclass
name: Build
name: Release Workflow

on:
push:
tags:
- '*'
branches:
- develop
permissions:
contents: write
pull-requests: write
issues: write
jobs:
build-test:
create_release_branch_and_tag:
runs-on: ubuntu-latest

steps:
- name: Checkout
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: sh ./.build.sh
shell: bash
- run: echo "Uploading release package"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Check output

- name: Get commit message and extract version
id: get_commit_message
run: |
echo ${{ steps.vars.outputs.tag }}
- name: Update draft to ${{ steps.vars.outputs.tag }}
id: create-release
MESSAGE=$(git log --format=%B -n 1 ${{ github.sha }})
echo "MESSAGE=$MESSAGE" >> $GITHUB_ENV
if [[ $MESSAGE =~ \[release-([0-9]+\.[0-9]+\.[0-9])+\.{0,1}([dev|rc|beta[0-9]*)?\] ]]; then
echo "Release string found in the commit message."
BASE_VERSION="${BASH_REMATCH[1]}"
SUB_VERSION="${BASH_REMATCH[2]}"
SUB_SUB_VERSION="${BASH_REMATCH[3]}"
VERSION=${SUB_VERSION:+$BASE_VERSION.$SUB_VERSION}
VERSION=${VERSION:-$BASE_VERSION}
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV
echo "SUB_VERSION=$SUB_VERSION" >> $GITHUB_ENV
echo "SUB_SUB_VERSION=$SUB_SUB_VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
else
echo "No release string found in the commit message."
fi
- name: setup git config
if: env.VERSION != null
id: setup_git
run: |
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
curl \
-X POST \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
https://api.github.com/repos/mindstellar/Osclass/releases \
-d '{"tag_name":"${{ steps.vars.outputs.tag }}", "name": "Osclass v${{ steps.vars.outputs.tag }}", "draft": true}' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- run: |
curl \
-X POST \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Content-Type: application/zip' \
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
https://uploads.github.com/repos/mindstellar/Osclass/releases/${{fromJSON(env.JSON_RESPONSE).id }}/assets?name=osclass_v${{ steps.vars.outputs.tag }}.zip \
--data-binary "@release/osclass_v${{ steps.vars.outputs.tag }}.zip"
# setup the username and email.'GitHub Actions Bot' with no email by default
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Create branch/tag
if: env.VERSION != null
id: create_branch
run: |
echo "Base version: $BASE_VERSION"
echo "Sub version: $SUB_VERSION"
echo "Sub sub version: $SUB_SUB_VERSION"
echo "Version: $VERSION"
# Create release branch if not dev and release branch does not exist
if [[ $SUB_VERSION != "dev" ]]; then
# check if release branch already exists
if git show-ref --verify --quiet refs/heads/release/$BASE_VERSION; then
echo "Release branch already exists."
# checkout release branch and merge develop branch
git pull origin release/$BASE_VERSION
git checkout release/$BASE_VERSION
git merge develop
else
git checkout -b release/$BASE_VERSION
fi
fi
# Update version in codebase
sed -i -E "s/define\('OSCLASS_VERSION.+\);/define('OSCLASS_VERSION', '$VERSION');/" oc-includes/osclass/default-constants.php
# Commit changes if changes were made
if [[ $(git status --porcelain) ]]; then
git add oc-includes/osclass/default-constants.php
git commit -m "Update version to $VERSION"
fi
# Push changes and create tag
git push origin HEAD
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
# Determine if pre-release dev release
PRERELEASE=false
if [[ $SUB_VERSION =~ (dev|rc|beta) ]]; then
PRERELEASE=true
fi
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV


- name: Create GitHub Release Archive
if: env.VERSION != null
run: |
sh ./.build.sh
- name: Create GitHub Release
#Only create a release if the version is dev
if: env.VERSION != null
uses: softprops/action-gh-release@v1
with:
files: release/osclass_v${{ env.VERSION }}.zip
tag_name: ${{ env.BASE_VERSION }}
name: Release ${{ env.BASE_VERSION }}
draft: true
prerelease: ${{ env.PRERELEASE }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.0','7.1','7.2', '7.3', '7.4','8.0']
php-versions: ['7.4','8.0', '8.1', '8.2', '8.3' ]
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ robots.txt
/oc-admin/themes/modern/scss/bootstrap/
/oc-admin/themes/template/
.vscode/settings.json
.vscode/launch.json
info.php
testmail.php
config.php.local
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0}
* Fixed a bug that prevented adding new custom fields in admin dashboard.
* Fixed a potential bug which could lead to core file deletion.
## Update changelog for Osclass 5.2.0 Release Notes {#release-notes-5-2-0}
* New: Added support for PHP 8.0+ to 8.3
* New: Mysql8 support
* Fixed: [#462](https://github.com/mindstellar/Osclass/issues/462)
* Fixed: Multiple security issues as reported
* Fixed: Other Multiple bug fixes
* Fixed: Multiple performance improvements
* For more details, please check the commit history
Source: https://github.com/mindstellar/Osclass
5 changes: 5 additions & 0 deletions ChangelogHistory.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0}
* Fixed a bug that prevented adding new custom fields in admin dashboard.
* Fixed a potential bug which could lead to core file deletion.

# Osclass 5.1.0 Changelog
* New: Backend is based on Bootstrap 5
* New: Many changes are made to make it more user-friendly on small screens while keeping the same functionality
* New: System info page in the tools menu.
Expand Down
73 changes: 52 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,53 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)][license]
![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)
[![CodeFactor](https://www.codefactor.io/repository/github/mindstellar/osclass/badge)](https://www.codefactor.io/repository/github/mindstellar/osclass)
[![Test PHP|7.0|7.1|7.2|7.3|7.4|8.0](https://github.com/mindstellar/Osclass/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/mindstellar/Osclass/actions/workflows/test.yml)
[![Test PHP|7.2|7.3|7.4|8.0|8.1|8.2](https://github.com/mindstellar/Osclass/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/mindstellar/Osclass/actions/workflows/test.yml)
![Forks](https://img.shields.io/github/forks/mindstellar/osclass)
![Stars](https://img.shields.io/github/stars/mindstellar/osclass)
[![Latest Release](https://img.shields.io/badge/dynamic/json?label=Latest%20Release&query=%24.tag_name&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fmindstellar%2Fosclass%2Freleases%2Flatest)](https://github.com/mindstellar/Osclass/releases/latest)
![Downloads](https://img.shields.io/github/downloads/mindstellar/Osclass/total)

# Osclass <sub>by Mindstellar</sub>
# 📦 Osclass <sub>by Mindstellar</sub>

#### A free and open source script by Mindstellar
#### 💻 A free and open-source script to create your own classifieds site.

### What is Osclass?
### 🤔 What is Osclass?

Osclass is a free and open script to create your advertisement or listings site. Best features: Plugins, themes,
multi-language, CAPTCHA, dashboard, SEO friendly.
Osclass is a powerful script that allows you to create and manage your own online classifieds website.

### How to install Osclass?
With features like customizable themes and plugins, powerful search and filtering options, user registration and management, and free plugins for integration with popular payment gateways.

To install Osclass you need to follow these easy steps:
Osclass is the perfect solution for anyone looking to build a successful online marketplace.

### 🔥 Features

Some of the amazing features of Osclass include:

- 🎨 Customizable themes and plugins
- 🔍 Powerful search and filtering options
- 👥 User registration and management
- 💰 Integration with popular payment gateways
- 🌎 Multi-language support
- 🔒 CAPTCHA and other security measures
- 💻 Responsive design for mobile and desktop

### 🤝 Contributing

We welcome contributions of all kinds, from bug fixes to new features. If you're interested in contributing to Osclass, please follow these steps:

1. Fork the repository and clone it to your local machine.
2. Install the required dependencies using `npm install`.
3. Create a new branch for your changes.
4. Make your changes and test them thoroughly.
5. Commit your changes and push them to your forked repository.
6. Submit a pull request to the main repository.

### 📜 License

Osclass is released under the GPLv3 license. See [LICENSE](https://github.com/mindstellar/Osclass/blob/master/LICENSE) for more information.

### 🚀 Getting Started

To get started with Osclass, follow these easy steps:
***

1. Download the latest zip package of Osclass from [GitHub Release](https://github.com/mindstellar/Osclass/releases) and
Expand All @@ -41,7 +71,7 @@ To install Osclass you need to follow these easy steps:
![Step-3](https://raw.githubusercontent.com/mindstellar/Osclass-Docs/master/.gitbook/assets/installer-step-3.png)
Installation finished. Use the automatically-generated password to access your admin panel (example.com/oc-admin).

### How to get the latest version?
### 📚 How to get latest version of Osclass
Checkout our [GitHub Release](https://github.com/mindstellar/Osclass/releases) section to get latest version of osclass.

Do not use master branch for your deployment, it may include untested code. Only use zip file provided in our release section.
Expand All @@ -65,10 +95,10 @@ Once you're done, simply `cd` to Osclass directory and run `docker-compose up -d

Service|Address outside containers
------|---------
Webserver|[localhost:5000](http://localhost:5000)
PhpMyAdmin web interface|[localhost:5001](http://localhost:5001)
MySQL|**host:** `localhost`; **port:** `5002`
Mailhog web interface|[localhost:5003](http://localhost:5003)
Webserver|[localhost:5080](http://localhost:5080)
PhpMyAdmin web interface|[localhost:5800](http://localhost:5800)
MySQL|**host:** `localhost`; **port:** `5306`
Mailhog web interface|[localhost:5025](http://localhost:5025)

* #### Hosts for osclass docker environment ##

Expand Down Expand Up @@ -112,13 +142,14 @@ For any support related query, please visit our official support forum.
### Installation Guide
* Visit our documentation : https://docs.mindstellar.com/osclass-docs/beginners/install

### Project info
### 🔗 Links

* Documentation: [Documentation][documentation]
* License: [GPLv3][license]
- [Official Website][official-website]
- [Documentation][documentation]
- [Support Forum][support-forum]
- [GitHub Repository][github-repo]

[documentation]: https://docs.mindstellar.com/
[official-website]: https://osclass.org
[documentation]: https://docs.mindstellar.com/osclass-docs/beginners/install
[support-forum]: https://osclass.discourse.group
[original-code]: https://github.com/osclass/Osclass
[code]: https://github.com/mindstellar/Osclass
[license]: https://github.com/mindstellar/Osclass/blob/master/LICENSE
[github-repo]: https://github.com/mindstellar/Osclass
26 changes: 25 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,28 @@

## Reporting a Vulnerability

Please report security issues to `security@mindstellar.com`
Please report security issues to `security@mindstellar.com`# Security Policy 🔒

## Reporting a Vulnerability 🚨

If you believe you have found a security vulnerability in Osclass, please do not hesitate to contact us immediately at navjottomer@gmail.com.

When reporting a security vulnerability, please include as much information as possible, such as:

- A clear description of the vulnerability
- The steps to reproduce the vulnerability
- The potential impact of the vulnerability
- Any relevant logs or error messages
- Any suggested mitigation or remediation steps

We take security vulnerabilities very seriously and will do our best to respond to your report as soon as possible. We appreciate your help in making Osclass more secure for everyone.

## Responsible Disclosure 🤝

We ask that you do not publicly disclose the details of any security vulnerabilities until we have had a chance to investigate and address the issue. We are committed to addressing all vulnerabilities in a timely and responsible manner.

## Bug Bounty Program 💰

We currently do not have a bug bounty program in place, but we appreciate and acknowledge all security vulnerability reports we receive.

Thank you for your help in keeping Osclass secure! 🙏
Loading

0 comments on commit c91713b

Please sign in to comment.