Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lucee/extension-esapi
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Dec 6, 2024
2 parents bbf7998 + 9f36304 commit 0213cfb
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 16 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/test 53.yml → .github/workflows/main-5.4.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Build and test with 5.4
name: Java CI - Lucee 5.4

on: [push, pull_request,workflow_dispatch]

Expand All @@ -10,34 +10,34 @@ jobs:

runs-on: ubuntu-latest
env:
luceeVersion: light-5.3.10.97
luceeVersionQuery: 5/all/light
luceeVersion: light-6.0.0.381-SNAPSHOT
luceeVersionQuery: 5.4/all/light
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-script-runner-maven-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Build with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esapi-lex
path: dist/*.lex
- name: Checkout Lucee
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: lucee/lucee
path: lucee
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/main-6.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Java CI - Lucee 6.0

on: [push, pull_request,workflow_dispatch]

jobs:
build:

runs-on: ubuntu-latest
env:
luceeVersion: light-6.0.0.381-SNAPSHOT
luceeVersionQuery: 6.0/all/light
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-script-runner-maven-cache
- name: Cache Lucee files
uses: actions/cache@v4
with:
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Build with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: esapi-lex
path: dist/*.lex
- name: Checkout Lucee
uses: actions/checkout@v4
with:
repository: lucee/lucee
path: lucee
- name: Run Lucee Test Suite, testLabels="esapi"
uses: lucee/script-runner@main
with:
webroot: ${{ github.workspace }}/lucee/test
execute: /bootstrap-tests.cfm
luceeVersion: ${{ env.luceeVersion }}
luceeVersionQuery: ${{ env.luceeVersionQuery }}
extensionDir: ${{ github.workspace }}/dist
env:
testLabels: esapi
testAdditional: ${{ github.workspace }}/tests
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Ant
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant

name: Java CI 6.0
name: Java CI - Lucee latest

on: [push, pull_request,workflow_dispatch]

Expand All @@ -13,31 +13,31 @@ jobs:
luceeVersion: light-6.0.0.381-SNAPSHOT
luceeVersionQuery: 0/all/light
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: lucee-script-runner-maven-cache
- name: Cache Lucee files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache
key: lucee-downloads
- name: Build with Ant
run: ant -noinput -verbose -buildfile build.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: esapi-lex
path: dist/*.lex
- name: Checkout Lucee
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: lucee/lucee
path: lucee
Expand Down
19 changes: 19 additions & 0 deletions tests/LDEV4743.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" {
function run( testResults , testBox ) {
describe( title='Testcase for LDEV-4743' , body=function() {

it( title='Checking simple canonicalize()', body=function() {
expect( canonicalize( "Lucee", false, false ) ).toBe( "Lucee" );
});

it( title='Checking canonicalize() function with complex string', body=function() {
expect( canonicalize( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`.", false, false ) ).toBe( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`." );
});

it( title='Checking canonicalize() function with % symbol', skip=true, body=function() {
var str = '(80 - 100%).pdf'; // Only failed with the '%' symbol
expect( canonicalize( str, false, false ) ).toBe( str );
});
});
}
}

0 comments on commit 0213cfb

Please sign in to comment.