We use jfileupload applet in our cloud server to allow users to upload folder hierarchy from browser.
Recently our security team found an issue that if our site was vulnerable to XSS then anyone can read the jsessionid cookie. To fix this I changed the tomcat server.xml context attribute useHttpOnly="true" and most of the things were fine but the applet broke.
now it was giving me nothing except "unable to load" and NullPointerException string (no stacktrace) in applet console. I first thought its some local issue but then I tried from multiple machines and same issue. Googling didnt helped.
Finally after spending 3-4 hours I found that when applet tries to download the jar files the request were coming to tomcat and we were applying a WebSessionFilter that would redirect requests with no sessions to login page.
Skipping .jar files download from session filter check solved the issue. (I know, I know we should have used apache to serve the jar files and thats what we use in production but local developers usually dont run the entire stack and I had shut down apache locally).
Recently our security team found an issue that if our site was vulnerable to XSS then anyone can read the jsessionid cookie. To fix this I changed the tomcat server.xml context attribute useHttpOnly="true" and most of the things were fine but the applet broke.
now it was giving me nothing except "unable to load" and NullPointerException string (no stacktrace) in applet console. I first thought its some local issue but then I tried from multiple machines and same issue. Googling didnt helped.
Finally after spending 3-4 hours I found that when applet tries to download the jar files the request were coming to tomcat and we were applying a WebSessionFilter that would redirect requests with no sessions to login page.
Skipping .jar files download from session filter check solved the issue. (I know, I know we should have used apache to serve the jar files and thats what we use in production but local developers usually dont run the entire stack and I had shut down apache locally).
Comments
Post a Comment