From e3ec5d78b858184d8980e81c82292e631d403925 Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Thu, 2 Nov 2023 19:47:10 +0530 Subject: [PATCH 1/2] Added a testcase in canonicalize() function with % symbol for LDEV-4743 --- tests/LDEV4743.cfc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/LDEV4743.cfc diff --git a/tests/LDEV4743.cfc b/tests/LDEV4743.cfc new file mode 100644 index 0000000..393a8b1 --- /dev/null +++ b/tests/LDEV4743.cfc @@ -0,0 +1,14 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" { + function run( testResults , testBox ) { + describe( title='Testcase for LDEV-4743' , body=function() { + it( title='Checking canonicalize() function with % symbol' , body=function() { + expect( canonicalize("Lucee", false, false) ).toBe( "Lucee" ); + expect( canonicalize("!@##$^&*()_+{}[]:"";''<>, .?/|\~`.", false, false) ).toBe( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`." ); + expect( function() { + var str = '(80 - 100%).pdf'; // Only failed with the '%' symbol + canonicalize(str, false, false); + }).notToThrow(); + }); + }); + } +} \ No newline at end of file From 6d45549d766ed5e0f5e527646cd433c55baa6553 Mon Sep 17 00:00:00 2001 From: Saravanamuthu Aka CF Mitrah Date: Thu, 2 Nov 2023 19:57:35 +0530 Subject: [PATCH 2/2] Disabled the testcase --- tests/LDEV4743.cfc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/LDEV4743.cfc b/tests/LDEV4743.cfc index 393a8b1..9d0b33e 100644 --- a/tests/LDEV4743.cfc +++ b/tests/LDEV4743.cfc @@ -1,4 +1,4 @@ -component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" { +component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" skip=true { function run( testResults , testBox ) { describe( title='Testcase for LDEV-4743' , body=function() { it( title='Checking canonicalize() function with % symbol' , body=function() { @@ -11,4 +11,4 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" { }); }); } -} \ No newline at end of file +}