We use jump uploader (applet) to upload files to our application. There is a requirement to block certain files, which contain a certain set of substrings or characters in it. It uses regex to check for file name patterns and here is the regex string it uses to check for patterns:
<param name="uc_fileNamePattern" value="(?i)^(.*\.(?!exe|bat|jpg|gif|png|bmp|tif|tiff|asp|aspx|php|html|js|jar)[^\.]*)|([^\.]+)$"
So the above example blocks files with any of the extensions listed, eg;
We need to modify the regex so those extensions are still blocked, but additionally we want to block filenames that contain any of the terms listed below.
For example we would want to block ‘dropship.pdf’ because the filename contains the term ‘drop’
The new set of characters/Substrings which need to be checked in the file name are:
The regex string provided in the value needs to be modified, so that files containing above substrings in the file name are blocked. Any help with that will be hugely appreciated.
Thanks In Advance,