github-advanced-security[bot] commented on code in PR #530:
URL: https://github.com/apache/jspwiki/pull/530#discussion_r3886848692
##########
jspwiki-main/src/main/java/org/apache/wiki/plugin/ReferredPagesPlugin.java:
##########
@@ -194,12 +190,13 @@
// glob compiler : * is 0..n instance of any char -- more convenient
as input
// perl5 compiler : .* is 0..n instances of any char -- more powerful
//PatternCompiler g_compiler = new GlobCompiler();
- final PatternCompiler compiler = new Perl5Compiler();
try {
- m_includePattern = compiler.compile( includePattern );
- m_excludePattern = compiler.compile( excludePattern );
- } catch( final MalformedPatternException e ) {
+ m_includePattern = Pattern.compile( includePattern );
+ m_excludePattern = Pattern.compile( excludePattern );
Review Comment:
## CodeQL / Regular expression injection
This regular expression is constructed from a [user-provided value](1).
This regular expression is constructed from a [user-provided value](2).
[Show more
details](https://github.com/apache/jspwiki/security/code-scanning/36)
##########
jspwiki-main/src/main/java/org/apache/wiki/plugin/ReferredPagesPlugin.java:
##########
@@ -194,12 +190,13 @@
// glob compiler : * is 0..n instance of any char -- more convenient
as input
// perl5 compiler : .* is 0..n instances of any char -- more powerful
//PatternCompiler g_compiler = new GlobCompiler();
- final PatternCompiler compiler = new Perl5Compiler();
try {
- m_includePattern = compiler.compile( includePattern );
- m_excludePattern = compiler.compile( excludePattern );
- } catch( final MalformedPatternException e ) {
+ m_includePattern = Pattern.compile( includePattern );
Review Comment:
## CodeQL / Regular expression injection
This regular expression is constructed from a [user-provided value](1).
This regular expression is constructed from a [user-provided value](2).
[Show more
details](https://github.com/apache/jspwiki/security/code-scanning/35)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]