Open JoshuaGanter opened 1 year ago
The regex patterns inside the relative_file_path and optional_relative_file_path definitions contain some invalid escapes. See following report if they are used with the unicode flag u in javascript:
relative_file_path
optional_relative_file_path
u
> RegExp("^((?!(\\.\\.|\\.|\\~|(([cC][oO][nN]|[pP][rR][nN]|[aA][uU][xX]|[cC][lL][oO][cC][kK]\\$|[nN][uU][lL]|[cC][oO][mM][1-9]|[lL][pP][tT][1-9])(\\.[^\\/]*)?))\\/)([^\\x00-\\x1F<>:\"\\/\\\\|\\$\\%]{0,254}[^\\x00-\\x1F<>:\"\\/\\\\|\\$\\%\\.\\x20|]\\/))*(?!(\\.\\.|\\.|\\~|(([cC][oO][nN]|[pP][rR][nN]|[aA][uU][xX]|[cC][lL][oO][cC][kK]\\$|[nN][uU][lL]|[cC][oO][mM][1-9]|[lL][pP][tT][1-9])(\\..*)?))$)([^\\x00-\\x1F<>:\"\\/\\\\|]{0,254}[^\\x00-\\x1F<>:\"\\/\\\\\\.\\x20|]$)$", "u"); Uncaught SyntaxError: Invalid regular expression: /^((?!(\.\.|\.|\~|(([cC][oO][nN]|[pP][rR][nN]|[aA][uU][xX]|[cC][lL][oO][cC][kK]\$|[nN][uU][lL]|[cC][oO][mM][1-9]|[lL][pP][tT][1-9])(\.[^\/]*)?))\/)([^\x00-\x1F<>:"\/\\|\$\%]{0,254}[^\x00-\x1F<>:"\/\\|\$\%\.\x20|]\/))*(?!(\.\.|\.|\~|(([cC][oO][nN]|[pP][rR][nN]|[aA][uU][xX]|[cC][lL][oO][cC][kK]\$|[nN][uU][lL]|[cC][oO][mM][1-9]|[lL][pP][tT][1-9])(\..*)?))$)([^\x00-\x1F<>:"\/\\|]{0,254}[^\x00-\x1F<>:"\/\\\.\x20|]$)$/: Invalid escape
The characters ~ and % should not be escaped.
~
%
The regex patterns inside the
relative_file_path
andoptional_relative_file_path
definitions contain some invalid escapes. See following report if they are used with the unicode flagu
in javascript:The characters
~
and%
should not be escaped.