Skip to content

Commit c91713b

Browse files
authored
Merge pull request #496 from mindstellar/release/5.2.0
Release/5.2.0
2 parents 561833c + 6d48aad commit c91713b

File tree

276 files changed

+6624
-11863
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+6624
-11863
lines changed

.bump

Lines changed: 0 additions & 10 deletions
This file was deleted.

.docker/php-fpm/Dockerfile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Custom PHP-FPM image with PHP extensions and Composer
2+
FROM php:8.3-fpm-alpine
3+
LABEL maintainer="navjottomer@gmail.com"
4+
5+
# Download script to install PHP extensions and dependencies
6+
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
7+
RUN chmod +x /usr/local/bin/install-php-extensions
8+
9+
RUN apk add --no-cache \
10+
coreutils \
11+
curl \
12+
git \
13+
zip unzip \
14+
# iconv, mbstring and pdo_sqlite are omitted as they are already installed
15+
&& PHP_EXTENSIONS=" \
16+
amqp \
17+
bcmath \
18+
bz2 \
19+
curl \
20+
calendar \
21+
event \
22+
exif \
23+
fileinfo \
24+
gd \
25+
gettext \
26+
intl \
27+
ldap \
28+
mcrypt \
29+
memcached \
30+
memcache \
31+
mysqli \
32+
opcache \
33+
redis \
34+
soap \
35+
sockets \
36+
xsl \
37+
zip \
38+
" \
39+
&& install-php-extensions $PHP_EXTENSIONS
40+
# Install Composer.
41+
ENV PATH=$PATH:/root/composer/vendor/bin \
42+
COMPOSER_ALLOW_SUPERUSER=1 \
43+
COMPOSER_HOME=/root/composer
44+
RUN cd /root \
45+
# Download installer and check for its integrity.
46+
&& curl -sSL https://getcomposer.org/installer > composer-setup.php \
47+
&& curl -sSL https://composer.github.io/installer.sha384sum > composer-setup.sha384sum \
48+
&& sha384sum --check composer-setup.sha384sum \
49+
# Install Composer 2.
50+
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer --2 \
51+
# Remove installer files.
52+
&& rm /root/composer-setup.php /root/composer-setup.sha384sum
53+
CMD ["php-fpm"]

.docker/php-fpm/php-ini-overrides.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
upload_max_filesize = 100M
22
post_max_size = 108M
3-
sendmail_path = /usr/bin/mhsendmail --smtp-addr mailhog:1025
3+
sendmail_path = '/usr/sbin/sendmail -t -i -S mailhog:1025'

.github/workflows/build.yml

Lines changed: 93 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,103 @@
1-
# GitHub Action for Osclass
2-
name: Build
1+
name: Release Workflow
2+
33
on:
44
push:
5-
tags:
6-
- '*'
5+
branches:
6+
- develop
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
issues: write
711
jobs:
8-
build-test:
12+
create_release_branch_and_tag:
913
runs-on: ubuntu-latest
14+
1015
steps:
11-
- name: Checkout
16+
- name: Checkout code
1217
uses: actions/checkout@v2
13-
- name: Build
14-
run: sh ./.build.sh
15-
shell: bash
16-
- run: echo "Uploading release package"
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
- name: Set output
20-
id: vars
21-
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
22-
- name: Check output
18+
19+
- name: Get commit message and extract version
20+
id: get_commit_message
2321
run: |
24-
echo ${{ steps.vars.outputs.tag }}
25-
- name: Update draft to ${{ steps.vars.outputs.tag }}
26-
id: create-release
22+
MESSAGE=$(git log --format=%B -n 1 ${{ github.sha }})
23+
echo "MESSAGE=$MESSAGE" >> $GITHUB_ENV
24+
if [[ $MESSAGE =~ \[release-([0-9]+\.[0-9]+\.[0-9])+\.{0,1}([dev|rc|beta[0-9]*)?\] ]]; then
25+
echo "Release string found in the commit message."
26+
BASE_VERSION="${BASH_REMATCH[1]}"
27+
SUB_VERSION="${BASH_REMATCH[2]}"
28+
SUB_SUB_VERSION="${BASH_REMATCH[3]}"
29+
VERSION=${SUB_VERSION:+$BASE_VERSION.$SUB_VERSION}
30+
VERSION=${VERSION:-$BASE_VERSION}
31+
echo "BASE_VERSION=$BASE_VERSION" >> $GITHUB_ENV
32+
echo "SUB_VERSION=$SUB_VERSION" >> $GITHUB_ENV
33+
echo "SUB_SUB_VERSION=$SUB_SUB_VERSION" >> $GITHUB_ENV
34+
echo "VERSION=$VERSION" >> $GITHUB_ENV
35+
else
36+
echo "No release string found in the commit message."
37+
fi
38+
- name: setup git config
39+
if: env.VERSION != null
40+
id: setup_git
2741
run: |
28-
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
29-
curl \
30-
-X POST \
31-
-H 'Accept: application/vnd.github.v3+json' \
32-
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
33-
https://api.github.com/repos/mindstellar/Osclass/releases \
34-
-d '{"tag_name":"${{ steps.vars.outputs.tag }}", "name": "Osclass v${{ steps.vars.outputs.tag }}", "draft": true}' >> $GITHUB_ENV
35-
echo 'EOF' >> $GITHUB_ENV
36-
- run: |
37-
curl \
38-
-X POST \
39-
-H 'Accept: application/vnd.github.v3+json' \
40-
-H 'Content-Type: application/zip' \
41-
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
42-
https://uploads.github.com/repos/mindstellar/Osclass/releases/${{fromJSON(env.JSON_RESPONSE).id }}/assets?name=osclass_v${{ steps.vars.outputs.tag }}.zip \
43-
--data-binary "@release/osclass_v${{ steps.vars.outputs.tag }}.zip"
42+
# setup the username and email.'GitHub Actions Bot' with no email by default
43+
git config user.name "GitHub Actions Bot"
44+
git config user.email "<>"
45+
- name: Create branch/tag
46+
if: env.VERSION != null
47+
id: create_branch
48+
run: |
49+
echo "Base version: $BASE_VERSION"
50+
echo "Sub version: $SUB_VERSION"
51+
echo "Sub sub version: $SUB_SUB_VERSION"
52+
echo "Version: $VERSION"
53+
54+
# Create release branch if not dev and release branch does not exist
4455
45-
56+
if [[ $SUB_VERSION != "dev" ]]; then
57+
# check if release branch already exists
58+
if git show-ref --verify --quiet refs/heads/release/$BASE_VERSION; then
59+
echo "Release branch already exists."
60+
# checkout release branch and merge develop branch
61+
git pull origin release/$BASE_VERSION
62+
git checkout release/$BASE_VERSION
63+
git merge develop
64+
else
65+
git checkout -b release/$BASE_VERSION
66+
fi
67+
fi
68+
69+
# Update version in codebase
70+
sed -i -E "s/define\('OSCLASS_VERSION.+\);/define('OSCLASS_VERSION', '$VERSION');/" oc-includes/osclass/default-constants.php
71+
72+
# Commit changes if changes were made
73+
if [[ $(git status --porcelain) ]]; then
74+
git add oc-includes/osclass/default-constants.php
75+
git commit -m "Update version to $VERSION"
76+
fi
77+
78+
# Push changes and create tag
79+
git push origin HEAD
80+
git tag -a $VERSION -m "Release $VERSION"
81+
git push origin $VERSION
82+
83+
# Determine if pre-release dev release
84+
PRERELEASE=false
85+
if [[ $SUB_VERSION =~ (dev|rc|beta) ]]; then
86+
PRERELEASE=true
87+
fi
88+
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
4689
47-
48-
90+
- name: Create GitHub Release Archive
91+
if: env.VERSION != null
92+
run: |
93+
sh ./.build.sh
94+
- name: Create GitHub Release
95+
#Only create a release if the version is dev
96+
if: env.VERSION != null
97+
uses: softprops/action-gh-release@v1
98+
with:
99+
files: release/osclass_v${{ env.VERSION }}.zip
100+
tag_name: ${{ env.BASE_VERSION }}
101+
name: Release ${{ env.BASE_VERSION }}
102+
draft: true
103+
prerelease: ${{ env.PRERELEASE }}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
operating-system: [ubuntu-latest]
9-
php-versions: ['7.0','7.1','7.2', '7.3', '7.4','8.0']
9+
php-versions: ['7.4','8.0', '8.1', '8.2', '8.3' ]
1010
runs-on: ${{ matrix.operating-system }}
1111
steps:
1212
- name: Checkout

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ robots.txt
6464
/oc-admin/themes/modern/scss/bootstrap/
6565
/oc-admin/themes/template/
6666
.vscode/settings.json
67+
.vscode/launch.json
68+
info.php
69+
testmail.php
70+
config.php.local

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0}
2-
* Fixed a bug that prevented adding new custom fields in admin dashboard.
3-
* Fixed a potential bug which could lead to core file deletion.
1+
## Update changelog for Osclass 5.2.0 Release Notes {#release-notes-5-2-0}
2+
* New: Added support for PHP 8.0+ to 8.3
3+
* New: Mysql8 support
4+
* Fixed: [#462](https://github.com/mindstellar/Osclass/issues/462)
5+
* Fixed: Multiple security issues as reported
6+
* Fixed: Other Multiple bug fixes
7+
* Fixed: Multiple performance improvements
8+
* For more details, please check the commit history
49
Source: https://github.com/mindstellar/Osclass

ChangelogHistory.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Update changelog for Osclass 5.1.1 Release Notes {#release-notes-5-1-0}
2+
* Fixed a bug that prevented adding new custom fields in admin dashboard.
3+
* Fixed a potential bug which could lead to core file deletion.
4+
5+
# Osclass 5.1.0 Changelog
16
* New: Backend is based on Bootstrap 5
27
* New: Many changes are made to make it more user-friendly on small screens while keeping the same functionality
38
* New: System info page in the tools menu.

README.md

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,53 @@
1-
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)][license]
1+
![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)
22
[![CodeFactor](https://www.codefactor.io/repository/github/mindstellar/osclass/badge)](https://www.codefactor.io/repository/github/mindstellar/osclass)
3-
[![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)
3+
[![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)
44
![Forks](https://img.shields.io/github/forks/mindstellar/osclass)
55
![Stars](https://img.shields.io/github/stars/mindstellar/osclass)
66
[![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)
77
![Downloads](https://img.shields.io/github/downloads/mindstellar/Osclass/total)
88

9-
# Osclass <sub>by Mindstellar</sub>
9+
# 📦 Osclass <sub>by Mindstellar</sub>
1010

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

13-
### What is Osclass?
13+
### 🤔 What is Osclass?
1414

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

18-
### How to install Osclass?
17+
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.
1918

20-
To install Osclass you need to follow these easy steps:
19+
Osclass is the perfect solution for anyone looking to build a successful online marketplace.
20+
21+
### 🔥 Features
22+
23+
Some of the amazing features of Osclass include:
24+
25+
- 🎨 Customizable themes and plugins
26+
- 🔍 Powerful search and filtering options
27+
- 👥 User registration and management
28+
- 💰 Integration with popular payment gateways
29+
- 🌎 Multi-language support
30+
- 🔒 CAPTCHA and other security measures
31+
- 💻 Responsive design for mobile and desktop
32+
33+
### 🤝 Contributing
34+
35+
We welcome contributions of all kinds, from bug fixes to new features. If you're interested in contributing to Osclass, please follow these steps:
36+
37+
1. Fork the repository and clone it to your local machine.
38+
2. Install the required dependencies using `npm install`.
39+
3. Create a new branch for your changes.
40+
4. Make your changes and test them thoroughly.
41+
5. Commit your changes and push them to your forked repository.
42+
6. Submit a pull request to the main repository.
43+
44+
### 📜 License
45+
46+
Osclass is released under the GPLv3 license. See [LICENSE](https://github.com/mindstellar/Osclass/blob/master/LICENSE) for more information.
47+
48+
### 🚀 Getting Started
49+
50+
To get started with Osclass, follow these easy steps:
2151
***
2252

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

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

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

6696
Service|Address outside containers
6797
------|---------
68-
Webserver|[localhost:5000](http://localhost:5000)
69-
PhpMyAdmin web interface|[localhost:5001](http://localhost:5001)
70-
MySQL|**host:** `localhost`; **port:** `5002`
71-
Mailhog web interface|[localhost:5003](http://localhost:5003)
98+
Webserver|[localhost:5080](http://localhost:5080)
99+
PhpMyAdmin web interface|[localhost:5800](http://localhost:5800)
100+
MySQL|**host:** `localhost`; **port:** `5306`
101+
Mailhog web interface|[localhost:5025](http://localhost:5025)
72102

73103
* #### Hosts for osclass docker environment ##
74104

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

115-
### Project info
145+
### 🔗 Links
116146

117-
* Documentation: [Documentation][documentation]
118-
* License: [GPLv3][license]
147+
- [Official Website][official-website]
148+
- [Documentation][documentation]
149+
- [Support Forum][support-forum]
150+
- [GitHub Repository][github-repo]
119151

120-
[documentation]: https://docs.mindstellar.com/
152+
[official-website]: https://osclass.org
153+
[documentation]: https://docs.mindstellar.com/osclass-docs/beginners/install
121154
[support-forum]: https://osclass.discourse.group
122-
[original-code]: https://github.com/osclass/Osclass
123-
[code]: https://github.com/mindstellar/Osclass
124-
[license]: https://github.com/mindstellar/Osclass/blob/master/LICENSE
155+
[github-repo]: https://github.com/mindstellar/Osclass

SECURITY.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,28 @@
22

33
## Reporting a Vulnerability
44

5-
Please report security issues to `security@mindstellar.com`
5+
Please report security issues to `security@mindstellar.com`# Security Policy 🔒
6+
7+
## Reporting a Vulnerability 🚨
8+
9+
If you believe you have found a security vulnerability in Osclass, please do not hesitate to contact us immediately at navjottomer@gmail.com.
10+
11+
When reporting a security vulnerability, please include as much information as possible, such as:
12+
13+
- A clear description of the vulnerability
14+
- The steps to reproduce the vulnerability
15+
- The potential impact of the vulnerability
16+
- Any relevant logs or error messages
17+
- Any suggested mitigation or remediation steps
18+
19+
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.
20+
21+
## Responsible Disclosure 🤝
22+
23+
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.
24+
25+
## Bug Bounty Program 💰
26+
27+
We currently do not have a bug bounty program in place, but we appreciate and acknowledge all security vulnerability reports we receive.
28+
29+
Thank you for your help in keeping Osclass secure! 🙏

0 commit comments

Comments
 (0)