3.8.2 Security Release (#284)
* Feature/travis ci to GitHub actions (#282) * Updates Composer/NPM Dependencies & Adds New GitHub Actions * Moves All CI/CI Functionality to GitHub Actions - Updates Composer & NPM dependencies to newer versions. - Updates default development environment WordPress version to 5.6.x. - Fixes missing updated to the language POT file. - Moves to using a GitHub Release for WordPress.org deployment. - Removes TravisCI configuration. * Fixes Login Page XSS Issue (#283) - Adds escaping to the errot output message. - Adds escaping to the login button output. * Patch Version Bump & Changelog Updates for Releaseisekai
parent
3a300e92bb
commit
14dbc06203
@ -0,0 +1,49 @@
|
|||||||
|
name: Internationalization
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- 'release/**'
|
||||||
|
- 'feature/**'
|
||||||
|
- 'fix/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
WP_MULTISITE: 0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Setup & Check
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
# https://github.com/marketplace/actions/setup-node-js-environment
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Cache node modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
npm-cache-name: cache-node-modules
|
||||||
|
with:
|
||||||
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-build-${{ env.npm-cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.npm-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: NPM Install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Check i18n Compliance
|
||||||
|
run: npm run i18n:check
|
@ -0,0 +1,50 @@
|
|||||||
|
name: Coding Standards
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- 'release/**'
|
||||||
|
- 'feature/**'
|
||||||
|
- 'fix/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
PHP_VERSION: 7.3
|
||||||
|
WP_MULTISITE: 0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Setup & Check
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP Environment
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
# https://github.com/marketplace/actions/setup-php-action
|
||||||
|
with:
|
||||||
|
php-version: ${{ env.PHP_VERSION }}
|
||||||
|
tools: composer:v1
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
composer-cache-name: cache-vendor
|
||||||
|
with:
|
||||||
|
path: ~/vendor
|
||||||
|
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.composer-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Install Composer Dependencies
|
||||||
|
run: composer install
|
||||||
|
|
||||||
|
- name: Check WordPress Coding Standards
|
||||||
|
run: composer run-script lint
|
@ -1,29 +0,0 @@
|
|||||||
name: Deploy to WordPress.org
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
jobs:
|
|
||||||
tag:
|
|
||||||
name: New tag
|
|
||||||
if: github.repository == 'oidc-wp/openid-connect-generic'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@main
|
|
||||||
|
|
||||||
# - name: Validate composer.json and composer.lock
|
|
||||||
# run: composer validate
|
|
||||||
|
|
||||||
# - name: Install dependencies
|
|
||||||
# run: composer install --prefer-dist --no-progress --no-suggest --no-dev
|
|
||||||
|
|
||||||
# - name: Build
|
|
||||||
# run: |
|
|
||||||
# npm install
|
|
||||||
# npm run build
|
|
||||||
- name: WordPress Plugin Deploy
|
|
||||||
uses: 10up/action-wordpress-plugin-deploy@1.4.0
|
|
||||||
env:
|
|
||||||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
|
|
||||||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
|
|
||||||
SLUG: daggerhart-openid-connect-generic
|
|
@ -0,0 +1,76 @@
|
|||||||
|
name: PR Unit Testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
# Triggers the workflow on pull request events
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
PHP_PREF_MIN_VERSION: '7.3'
|
||||||
|
WP_STABLE_VERSION: '5.6.*'
|
||||||
|
WP_MULTISITE: 0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- job-name: 'Latest Stable Requirements'
|
||||||
|
bleeding-edge: false
|
||||||
|
php-version: '7.3'
|
||||||
|
wordpress-version: '5.6.*'
|
||||||
|
wp-multisite-mode: 0
|
||||||
|
|
||||||
|
name: '${{ matrix.job-name }} (PHP:${{ matrix.php-version }}/WP:${{ matrix.wordpress-version }})'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP Environment
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
# https://github.com/marketplace/actions/setup-php-action
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
tools: composer:v1
|
||||||
|
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
# https://github.com/marketplace/actions/setup-node-js-environment
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
composer-cache-name: cache-vendor
|
||||||
|
with:
|
||||||
|
path: ~/vendor
|
||||||
|
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.composer-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Require Specified WordPress Version
|
||||||
|
run: composer require wordpress/wordpress:${{ matrix.wordpress-version }} --dev --prefer-source --update-with-all-dependencies
|
||||||
|
|
||||||
|
- name: Update Composer Lockfile for Specified WordPress Version
|
||||||
|
run: composer update wordpress/wordpress:${{ matrix.wordpress-version }} --lock --prefer-source
|
||||||
|
|
||||||
|
- name: PHPUnit PHP 7.4 Support
|
||||||
|
if: matrix.php-version == '7.4'
|
||||||
|
run: |
|
||||||
|
composer global require phpunit/php-code-coverage=dev-master
|
||||||
|
composer global require sebastian/global-state:dev-master
|
||||||
|
composer global require phpunit/phpunit=dev-master
|
||||||
|
|
||||||
|
- name: NPM Setup
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
run: npm run test
|
@ -0,0 +1,54 @@
|
|||||||
|
name: Prepare & Deploy a Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
env:
|
||||||
|
WP_MULTISITE: 0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: New Release
|
||||||
|
|
||||||
|
if: github.repository == 'oidc-wp/openid-connect-generic'
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
# https://github.com/marketplace/actions/setup-node-js-environment
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Cache Node Modules
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
npm-cache-name: cache-node-modules
|
||||||
|
with:
|
||||||
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-build-${{ env.npm-cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.npm-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: NPM Install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Prepare a WordPress.org Release
|
||||||
|
run: npm run release
|
||||||
|
|
||||||
|
- name: WordPress.org Plugin Deploy
|
||||||
|
uses: nk-o/action-wordpress-plugin-deploy@master
|
||||||
|
# https://github.com/marketplace/actions/wordpress-plugin-deploy
|
||||||
|
env:
|
||||||
|
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
|
||||||
|
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
|
||||||
|
SOURCE_DIR: dist/
|
||||||
|
SLUG: daggerhart-openid-connect-generic
|
@ -0,0 +1,55 @@
|
|||||||
|
name: Static Code Analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- 'release/**'
|
||||||
|
- 'feature/**'
|
||||||
|
- 'fix/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
PHP_VERSION: 7.3
|
||||||
|
WP_MODE: 'single'
|
||||||
|
WP_MULTISITE: 0
|
||||||
|
WP_VERSION: '5.6.*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Setup & Check
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP Environment
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
# https://github.com/marketplace/actions/setup-php-action
|
||||||
|
with:
|
||||||
|
php-version: ${{ env.PHP_VERSION }}
|
||||||
|
tools: composer:v1
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
composer-cache-name: cache-vendor
|
||||||
|
with:
|
||||||
|
path: ~/vendor
|
||||||
|
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.composer-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Require Specified WordPress Version
|
||||||
|
run: composer require wordpress/wordpress:${{ env.WP_VERSION }} --dev --prefer-source --update-with-all-dependencies
|
||||||
|
|
||||||
|
- name: Install Composer Dependencies
|
||||||
|
run: composer install
|
||||||
|
|
||||||
|
- name: Perform Static Analysis
|
||||||
|
run: composer run-script analyze
|
@ -0,0 +1,108 @@
|
|||||||
|
name: Unit Testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
# Triggers the workflow on push events only for the matching branches
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
- main
|
||||||
|
- 'release/**'
|
||||||
|
- 'feature/**'
|
||||||
|
- 'fix/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
PHP_MIN_VERSION: '7.1'
|
||||||
|
PHP_PREF_MIN_VERSION: '7.2'
|
||||||
|
PHP_STABLE_VERSION: '7.4'
|
||||||
|
WP_MIN_VERSION: '5.3.*'
|
||||||
|
WP_PREF_MIN_VERSION: '5.4.*'
|
||||||
|
WP_STABLE_VERSION: '5.6.*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
continue-on-error: ${{ matrix.bleeding-edge }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- job-name: 'Latest Stable Requirements'
|
||||||
|
bleeding-edge: false
|
||||||
|
php-version: '7.3'
|
||||||
|
wordpress-version: '5.6.*'
|
||||||
|
wp-multisite-mode: 0
|
||||||
|
- job-name: 'Preferred Minimum Requirements'
|
||||||
|
bleeding-edge: false
|
||||||
|
php-version: '7.2'
|
||||||
|
wordpress-version: '5.4.*'
|
||||||
|
wp-multisite-mode: 0
|
||||||
|
- job-name: 'Minimum Requirements'
|
||||||
|
bleeding-edge: false
|
||||||
|
php-version: '7.1'
|
||||||
|
wordpress-version: '5.3.*'
|
||||||
|
wp-multisite-mode: 0
|
||||||
|
- job-name: 'Bleeding Edge Requirements'
|
||||||
|
bleeding-edge: true
|
||||||
|
php-version: '7.4'
|
||||||
|
wordpress-version: 'dev-master'
|
||||||
|
wp-multisite-mode: 0
|
||||||
|
- job-name: 'Multisite Compatibility Requirements'
|
||||||
|
bleeding-edge: false
|
||||||
|
php-version: '7.3'
|
||||||
|
wordpress-version: '5.6.*'
|
||||||
|
wp-multisite-mode: 1
|
||||||
|
|
||||||
|
name: '${{ matrix.job-name }} (PHP:${{ matrix.php-version }}/WP:${{ matrix.wordpress-version }})'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP Environment
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
# https://github.com/marketplace/actions/setup-php-action
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-version }}
|
||||||
|
tools: composer:v1
|
||||||
|
|
||||||
|
- name: Setup Node Environment
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
# https://github.com/marketplace/actions/setup-node-js-environment
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
composer-cache-name: cache-vendor
|
||||||
|
with:
|
||||||
|
path: ~/vendor
|
||||||
|
key: ${{ runner.os }}-build-${{ env.composer-cache-name }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.composer-cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Require Specified WordPress Version
|
||||||
|
run: composer require wordpress/wordpress:${{ matrix.wordpress-version }} --dev --prefer-source --update-with-all-dependencies
|
||||||
|
|
||||||
|
- name: Update Composer Lockfile for Specified WordPress Version
|
||||||
|
run: composer update wordpress/wordpress:${{ matrix.wordpress-version }} --lock --prefer-source
|
||||||
|
|
||||||
|
- name: PHPUnit PHP 7.4 Support
|
||||||
|
if: matrix.php-version == '7.4'
|
||||||
|
run: |
|
||||||
|
composer global require phpunit/php-code-coverage=dev-master
|
||||||
|
composer global require sebastian/global-state:dev-master
|
||||||
|
composer global require phpunit/phpunit=dev-master
|
||||||
|
|
||||||
|
- name: NPM Setup
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Unit Tests
|
||||||
|
env:
|
||||||
|
WP_MULTISITE: ${{ matrix.wp-multisite-mode }}
|
||||||
|
run: npm run test
|
@ -1,132 +0,0 @@
|
|||||||
# Travis CI Configuration File
|
|
||||||
|
|
||||||
# Tell Travis CI which distro to use
|
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
# Tell Travis CI we're using PHP
|
|
||||||
language: php
|
|
||||||
|
|
||||||
# Tell Travis CI which notifications to send
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: never
|
|
||||||
on_failure: change
|
|
||||||
|
|
||||||
# whitelist branches for the "push" build check
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- dev
|
|
||||||
- main
|
|
||||||
- /^dev\-release\/.*$/
|
|
||||||
- /^feature\/.*$/
|
|
||||||
- /^fix\/.*$/
|
|
||||||
|
|
||||||
# Git clone depth
|
|
||||||
# By default Travis CI clones repositories to a depth of 50 commits
|
|
||||||
git:
|
|
||||||
depth: 1
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $HOME/.composer/cache
|
|
||||||
|
|
||||||
# Define a matrix of additional build configurations
|
|
||||||
# The versions listed above will automatically create our first configuration,
|
|
||||||
# so it doesn't need to be re-defined below.
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- name: Internationalization
|
|
||||||
php: 7.3
|
|
||||||
env: WP_MODE=single WP_VERSION=5.6.* I18N=1
|
|
||||||
- name: Coding Standards
|
|
||||||
php: 7.3
|
|
||||||
env: WP_MODE=single WP_VERSION=5.6.* PHP_LINT=1 COVERAGE=1
|
|
||||||
- name: Static Code Analysis
|
|
||||||
php: 7.3
|
|
||||||
env: WP_MODE=single WP_VERSION=5.6.* PHP_ANALYZE=1
|
|
||||||
- name: Latest Stable
|
|
||||||
php: 7.3
|
|
||||||
env: WP_MODE=single WP_VERSION=5.6.* PHP_UNIT=1
|
|
||||||
- name: Preferred Minimum requirements
|
|
||||||
if: (branch IN (dev, main) OR branch =~ /^dev\-release\/.*$/) AND NOT type = pull_request
|
|
||||||
php: 7.2
|
|
||||||
env: WP_MODE=single WP_VERSION=5.4.* PHP_UNIT=1
|
|
||||||
- name: Minimum requirements
|
|
||||||
if: (branch IN (dev, main) OR branch =~ /^dev\-release\/.*$/) AND NOT type = pull_request
|
|
||||||
php: 7.1
|
|
||||||
env: WP_MODE=single WP_VERSION=5.3.* PHP_UNIT=1
|
|
||||||
- name: Bleeding Edge
|
|
||||||
if: (branch IN (dev, main) OR branch =~ /^dev\-release\/.*$/) AND NOT type = pull_request
|
|
||||||
php: 7.4
|
|
||||||
env: WP_MODE=single WP_VERSION=dev-master PHP_UNIT=1
|
|
||||||
- name: Multisite Compatibility
|
|
||||||
if: (branch IN (dev, main) OR branch =~ /^dev\-release\/.*$/) AND NOT type = pull_request
|
|
||||||
php: 7.3
|
|
||||||
env: WP_MODE=multi WP_VERSION=5.6.* PHP_UNIT=1
|
|
||||||
allow_failures:
|
|
||||||
- name: Bleeding Edge
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- nodejs
|
|
||||||
|
|
||||||
# We need to make sure we stick with Composer 1.x for compatibility.
|
|
||||||
before_install:
|
|
||||||
- npm install -g npm@6.14
|
|
||||||
- npm install -g grunt-cli
|
|
||||||
- composer self-update --1
|
|
||||||
- composer require "wordpress/wordpress:${WP_VERSION}" --dev --prefer-source --no-update
|
|
||||||
|
|
||||||
install:
|
|
||||||
- composer update "wordpress/wordpress" --prefer-source --no-interaction --optimize-autoloader
|
|
||||||
- composer install
|
|
||||||
- npm install
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- export PATH="$HOME/.composer/vendor/bin:$PATH"
|
|
||||||
# Setup WordPress coding standards
|
|
||||||
- |
|
|
||||||
if [[ "$PHP_LINT" == "1" ]]; then
|
|
||||||
composer global require wp-coding-standards/wpcs
|
|
||||||
fi
|
|
||||||
# Setup unit testing environment
|
|
||||||
- |
|
|
||||||
if [[ "$PHP_UNIT" == "1" ]]; then
|
|
||||||
# bash scripts/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
|
|
||||||
if [[ $TRAVIS_PHP_VERSION == "7.4" ]]; then
|
|
||||||
composer global require "phpunit/php-code-coverage=dev-master"
|
|
||||||
composer global require "sebastian/global-state:dev-master"
|
|
||||||
composer global require "phpunit/phpunit=dev-master"
|
|
||||||
else
|
|
||||||
composer global require "phpunit/phpunit=7.*"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [[ "$I18N" == "1" ]]; then
|
|
||||||
if [[ "$WP_MODE" == "single" ]]; then WP_MULTISITE=0 npm run i18n:check; fi
|
|
||||||
fi
|
|
||||||
- |
|
|
||||||
if [[ "$PHP_LINT" == "1" ]]; then
|
|
||||||
if [[ "$WP_MODE" == "single" ]]; then WP_MULTISITE=0 npm run lint; fi
|
|
||||||
fi
|
|
||||||
- |
|
|
||||||
if [[ "$PHP_ANALYZE" == "1" ]]; then
|
|
||||||
if [[ "$WP_MODE" == "single" ]]; then WP_MULTISITE=0 npm run analyze; fi
|
|
||||||
fi
|
|
||||||
- |
|
|
||||||
if [[ "$PHP_UNIT" == "1" ]]; then
|
|
||||||
if [[ "$WP_MODE" == "multi" ]]; then WP_MULTISITE=1 npm run test; fi
|
|
||||||
if [[ "$WP_MODE" == "single" ]]; then WP_MULTISITE=0 npm run test; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- |
|
|
||||||
if [[ "$COVERAGE" == "1" ]]; then
|
|
||||||
bash <(curl -s https://codecov.io/bash)
|
|
||||||
fi
|
|
@ -1,5 +1,9 @@
|
|||||||
# OpenId Connect Generic Changelog
|
# OpenId Connect Generic Changelog
|
||||||
|
|
||||||
|
3.8.2
|
||||||
|
|
||||||
|
* Fix: @timnolte - Fixed reported XSS vulnerability on WordPress login screen.
|
||||||
|
|
||||||
3.8.1
|
3.8.1
|
||||||
|
|
||||||
* Fix: @timnolte - Prevent SSO redirect on password protected posts.
|
* Fix: @timnolte - Prevent SSO redirect on password protected posts.
|
@ -0,0 +1,201 @@
|
|||||||
|
# OpenID Connect Generic Client #
|
||||||
|
**Contributors:** [daggerhart](https://profiles.wordpress.org/daggerhart), [tnolte](https://profiles.wordpress.org/tnolte)
|
||||||
|
**Donate link:** http://www.daggerhart.com/
|
||||||
|
**Tags:** security, login, oauth2, openidconnect, apps, authentication, autologin, sso
|
||||||
|
**Requires at least:** 4.9
|
||||||
|
**Tested up to:** 5.6
|
||||||
|
**Stable tag:** 3.8.2
|
||||||
|
**Requires PHP:** 7.1
|
||||||
|
**License:** GPLv2 or later
|
||||||
|
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
|
A simple client that provides SSO or opt-in authentication against a generic OAuth2 Server implementation.
|
||||||
|
|
||||||
|
## Description ##
|
||||||
|
|
||||||
|
This plugin allows to authenticate users against OpenID Connect OAuth2 API with Authorization Code Flow.
|
||||||
|
Once installed, it can be configured to automatically authenticate users (SSO), or provide a "Login with OpenID Connect"
|
||||||
|
button on the login form. After consent has been obtained, an existing user is automatically logged into WordPress, while
|
||||||
|
new users are created in WordPress database.
|
||||||
|
|
||||||
|
Much of the documentation can be found on the Settings > OpenID Connect Generic dashboard page.
|
||||||
|
|
||||||
|
Please submit issues to the Github repo: https://github.com/daggerhart/openid-connect-generic
|
||||||
|
|
||||||
|
## Installation ##
|
||||||
|
|
||||||
|
1. Upload to the `/wp-content/plugins/` directory
|
||||||
|
1. Activate the plugin
|
||||||
|
1. Visit Settings > OpenID Connect and configure to meet your needs
|
||||||
|
|
||||||
|
## Frequently Asked Questions ##
|
||||||
|
|
||||||
|
### What is the client's Redirect URI? ###
|
||||||
|
|
||||||
|
Most OAuth2 servers will require whitelisting a set of redirect URIs for security purposes. The Redirect URI provided
|
||||||
|
by this client is like so: https://example.com/wp-admin/admin-ajax.php?action=openid-connect-authorize
|
||||||
|
|
||||||
|
Replace `example.com` with your domain name and path to WordPress.
|
||||||
|
|
||||||
|
### Can I change the client's Redirect URI? ###
|
||||||
|
|
||||||
|
Some OAuth2 servers do not allow for a client redirect URI to contain a query string. The default URI provided by
|
||||||
|
this module leverages WordPress's `admin-ajax.php` endpoint as an easy way to provide a route that does not include
|
||||||
|
HTML, but this will naturally involve a query string. Fortunately, this plugin provides a setting that will make use of
|
||||||
|
an alternate redirect URI that does not include a query string.
|
||||||
|
|
||||||
|
On the settings page for this plugin (Dashboard > Settings > OpenID Connect Generic) there is a checkbox for
|
||||||
|
**Alternate Redirect URI**. When checked, the plugin will use the Redirect URI
|
||||||
|
`https://example.com/openid-connect-authorize`.
|
||||||
|
|
||||||
|
|
||||||
|
## Changelog ##
|
||||||
|
|
||||||
|
### 3.8.2 ###
|
||||||
|
|
||||||
|
* Fix: @timnolte - Fixed reported XSS vulnerability on WordPress login screen.
|
||||||
|
|
||||||
|
### 3.8.1 ###
|
||||||
|
|
||||||
|
* Fix: @timnolte - Prevent SSO redirect on password protected posts.
|
||||||
|
* Fix: @timnolte - CI/CD build issues.
|
||||||
|
* Fix: @timnolte - Invalid redirect handling on logout for Auto Login setting.
|
||||||
|
|
||||||
|
### 3.8.0 ###
|
||||||
|
|
||||||
|
* Feature: @timnolte - Ability to use 6 new constants for setting client configuration instead of storing in the DB.
|
||||||
|
* Improvement: @timnolte - Plugin development & contribution updates.
|
||||||
|
* Improvement: @timnolte - Refactored to meet WordPress coding standards.
|
||||||
|
* Improvement: @timnolte - Refactored to provide localization.
|
||||||
|
|
||||||
|
### 3.7.1 ###
|
||||||
|
|
||||||
|
* Fix: Release Version Number.
|
||||||
|
|
||||||
|
### 3.7.0 ###
|
||||||
|
|
||||||
|
* Feature: @timnolte - Ability to enable/disable token refresh. Useful for IDPs that don't support token refresh.
|
||||||
|
* Feature: @timnolte - Support custom redirect URL(`redirect_to`) with the authentication URL & login button shortcodes.
|
||||||
|
- Supports additional attribute overrides including login `button_text`, `endpoint_login`, `scope`, `redirect_uri`.
|
||||||
|
|
||||||
|
### 3.6.0 ###
|
||||||
|
|
||||||
|
* Improvement: @RobjS - Improved error messages during login state failure.
|
||||||
|
* Improvement: @RobjS - New developer filter for login form button URL.
|
||||||
|
* Fix: @cs1m0n - Only increment username during new user creation if the "Link existing user" setting is enabled.
|
||||||
|
* Fix: @xRy-42 - Allow periods and spaces in usernames to match what WordPress core allows.
|
||||||
|
* Feature: @benochen - New setting named "Create user if does not exist" determines whether new users are created during login attempts.
|
||||||
|
* Improvement: @flat235 - Username transliteration and normalization.
|
||||||
|
|
||||||
|
### 3.5.1 ###
|
||||||
|
|
||||||
|
* Fix: @daggerhart - New approach to state management using transients.
|
||||||
|
|
||||||
|
### 3.5.0 ###
|
||||||
|
|
||||||
|
* Readme fix: @thijskh - Fix syntax error in example openid-connect-generic-login-button-text
|
||||||
|
* Feature: @slavicd - Allow override of the plugin by posting credentials to wp-login.php
|
||||||
|
* Feature: @gassan - New action on use login
|
||||||
|
* Fix: @daggerhart - Avoid double question marks in auth url query string
|
||||||
|
* Fix: @drzraf - wp-cli bootstrap must not inhibit custom rewrite rules
|
||||||
|
* Syntax change: @mullikine - Change PHP keywords to comply with PSR2
|
||||||
|
|
||||||
|
### 3.4.1 ###
|
||||||
|
|
||||||
|
* Minor documentation update and additional error checking.
|
||||||
|
|
||||||
|
### 3.4.0 ###
|
||||||
|
|
||||||
|
* Feature: @drzraf - New filter hook: ability to filter claim and derived user data before user creation.
|
||||||
|
* Feature: @anttileppa - State time limit can now be changed on the settings page.
|
||||||
|
* Fix: @drzraf - Fix PHP notice when using traditional login, $token_response may be empty.
|
||||||
|
* Fix: @drzraf - Fixed a notice when cookie does not contain expected redirect_url
|
||||||
|
|
||||||
|
### 3.3.1 ###
|
||||||
|
|
||||||
|
* Prefixing classes for more efficient autoloading.
|
||||||
|
* Avoid altering global wp_remote_post() parameters.
|
||||||
|
* Minor metadata updates for wp.org
|
||||||
|
|
||||||
|
### 3.3.0 ###
|
||||||
|
|
||||||
|
* Fix: @pjeby - Handle multiple user sessions better by using the `WP_Session_Tokens` object. Predecessor to fixes for multiple other issues: #49, #50, #51
|
||||||
|
|
||||||
|
### 3.2.1 ###
|
||||||
|
|
||||||
|
* Bug fix: @svenvanhal - Exit after issuing redirect. Fixes #46
|
||||||
|
|
||||||
|
### 3.2.0 ###
|
||||||
|
|
||||||
|
* Feature: @robbiepaul - trigger core action `wp_login` when user is logged in through this plugin
|
||||||
|
* Feature: @moriyoshi - Determine the WP_User display name with replacement tokens on the settings page. Tokens can be any property of the user_claim.
|
||||||
|
* Feature: New setting to set redirect URL when session expires.
|
||||||
|
* Feature: @robbiepaul - New filter for modifying authentication URL
|
||||||
|
* Fix: @cedrox - Adding id_token_hint to logout URL according to spec
|
||||||
|
* Bug fix: Provide port to the request header when requesting the user_claim
|
||||||
|
|
||||||
|
### 3.1.0 ###
|
||||||
|
|
||||||
|
* Feature: @rwasef1830 - Refresh tokens
|
||||||
|
* Feature: @rwasef1830 - Integrated logout support with end_session endpoint
|
||||||
|
* Feature: May use an alternate redirect_uri that doesn't rely on admin-ajax
|
||||||
|
* Feature: @ahatherly - Support for IDP behind reverse proxy
|
||||||
|
* Bug fix: @robertstaddon - case insensitive check for Bearer token
|
||||||
|
* Bug fix: @rwasef1830 - "redirect to origin when auto-sso" cookie issue
|
||||||
|
* Bug fix: @rwasef1830 - PHP Warnings headers already sent due to attempts to redirect and set cookies during login form message
|
||||||
|
* Bug fix: @rwasef1830 - expire session when access_token expires if no refresh token found
|
||||||
|
* UX fix: @rwasef1830 - Show login button on error redirect when using auto-sso
|
||||||
|
|
||||||
|
### 3.0.8 ###
|
||||||
|
|
||||||
|
* Feature: @wgengarelly - Added `openid-connect-generic-update-user-using-current-claim` action hook allowing other plugins/themes
|
||||||
|
to take action using the fresh claims received when an existing user logs in.
|
||||||
|
|
||||||
|
### 3.0.7 ###
|
||||||
|
|
||||||
|
* Bug fix: @wgengarelly - When requesting userinfo, send the access token using the Authorization header field as recommended in
|
||||||
|
section 5.3.1 of the specs.
|
||||||
|
|
||||||
|
### 3.0.6 ###
|
||||||
|
|
||||||
|
* Bug fix: @robertstaddon - If "Link Existing Users" is enabled, allow users who login with OpenID Connect to also log in with WordPress credentials
|
||||||
|
|
||||||
|
### 3.0.5 ###
|
||||||
|
|
||||||
|
* Feature: @robertstaddon - Added `[openid_connect_generic_login_button]` shortcode to allow the login button to be placed anywhere
|
||||||
|
* Feature: @robertstaddon - Added setting to "Redirect Back to Origin Page" after a successful login instead of redirecting to the home page.
|
||||||
|
|
||||||
|
### 3.0.4 ###
|
||||||
|
|
||||||
|
* Feature: @robertstaddon - Added setting to allow linking existing WordPress user accounts with newly-authenticated OpenID Connect login
|
||||||
|
|
||||||
|
### 3.0.3 ###
|
||||||
|
|
||||||
|
* Using WordPresss's is_ssl() for setcookie()'s "secure" parameter
|
||||||
|
* Bug fix: Incrementing username in case of collision.
|
||||||
|
* Bug fix: Wrong error sent when missing token body
|
||||||
|
|
||||||
|
### 3.0.2 ###
|
||||||
|
|
||||||
|
* Added http_request_timeout setting
|
||||||
|
|
||||||
|
### 3.0.1 ###
|
||||||
|
|
||||||
|
* Finalizing 3.0.x api
|
||||||
|
|
||||||
|
### 3.0 ###
|
||||||
|
|
||||||
|
* Complete rewrite to separate concerns
|
||||||
|
* Changed settings keys for clarity (requires updating settings if upgrading from another version)
|
||||||
|
* Error logging
|
||||||
|
|
||||||
|
### 2.1 ###
|
||||||
|
|
||||||
|
* Working my way closer to spec. Possible breaking change. Now checking for preferred_username as priority.
|
||||||
|
* New username determination to avoid collisions
|
||||||
|
|
||||||
|
### 2.0 ###
|
||||||
|
|
||||||
|
Complete rewrite
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue