Fix java logic issue

This commit is contained in:
amcmanu3 2022-06-21 17:00:51 -04:00
parent 4cef251a1c
commit 950cbce27c

View File

@ -1397,8 +1397,11 @@ class PanelHandler(BaseHandler):
" must be surrounded by quotes." " must be surrounded by quotes."
" (Are you missing a closing quote?)" " (Are you missing a closing quote?)"
) )
if not any( if (
java_selection in path for path in Helpers.find_java_installs() not any(
java_selection in path for path in Helpers.find_java_installs()
)
and java_selection != "java"
): ):
self.redirect( self.redirect(
"/panel/error?error=Attack attempted." "/panel/error?error=Attack attempted."
@ -1412,6 +1415,7 @@ class PanelHandler(BaseHandler):
+ " Possible attack. Act accordingly.", + " Possible attack. Act accordingly.",
self.get_remote_ip(), self.get_remote_ip(),
) )
return
if java_selection != "java": if java_selection != "java":
if self.helper.is_os_windows(): if self.helper.is_os_windows():
execution_list[0] = '"' + java_selection + '/bin/java"' execution_list[0] = '"' + java_selection + '/bin/java"'