Skip to content

Commit

Permalink
Improved: small improvements in SecurityUtilTest
Browse files Browse the repository at this point in the history
Just comments improvements
  • Loading branch information
JacquesLeRoux committed Oct 28, 2024
1 parent 1bacac9 commit 97aee6d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void webShellTokensTesting() {
chmod,mkdir,fopen,fclose,new file,upload,getfilename,download,getoutputstring,readfile,iframe,object,embed,onload,build,\
python,perl ,/perl,ruby ,/ruby,process,function,class,InputStream,to_server,wget ,static,assign,webappPath,\
ifconfig,route,crontab,netstat,uname ,hostname,iptables,whoami,"cmd",*cmd|,+cmd|,=cmd|,localhost,thread,require,gzdeflate,\
execute,println,calc,touch,curl,base64,tcp
execute,println,calc,touch,curl,base64,tcp,4444
*/
try {
List<String> allowed = new ArrayList<>();
Expand Down Expand Up @@ -138,7 +138,7 @@ public void webShellTokensTesting() {
assertFalse(SecuredUpload.isValidText("hostname", allowed));
assertFalse(SecuredUpload.isValidText("iptables", allowed));
assertFalse(SecuredUpload.isValidText("whoami", allowed));
// ip, ls, nc, ip, cat and pwd can't be used, too short
// ip, ls, nc, ip, cat and pwd can't be used, too short for allowing some images
assertFalse(SecuredUpload.isValidText("\"cmd\"", allowed));
assertFalse(SecuredUpload.isValidText("*cmd|", allowed));
assertFalse(SecuredUpload.isValidText("+cmd|", allowed));
Expand Down

0 comments on commit 97aee6d

Please sign in to comment.