You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2019/04/12 01:00:32 UTC

[GitHub] [storm] tjqiulu opened a new pull request #2994: 0.9.x branch

tjqiulu opened a new pull request #2994: 0.9.x branch
URL: https://github.com/apache/storm/pull/2994
 
 
   hi, developer,
   here is security issue by Fortify scan within script.js
   as follow are detail:
   Abstract:
   
   The method toggleSys() in script-.js sends unvalidated data to a web browser on line 59, which can result in the browser executing malicious code.
   
   
   Explanation:
   
   Cross-site scripting (XSS) vulnerabilities occur when:
   
   1. Data enters a web application through an untrusted source. In the case of DOM-based XSS, data is read from a URL parameter or other value within the browser and written back into the page with client-side code. In the case of Reflected XSS, the untrusted source is typically a web request, while in the case of Persisted (also known as Stored) XSS it is typically a database or other back-end data store.
   
   
   2. The data is included in dynamic content that is sent to a web user without being validated. In the case of DOM Based XSS, malicious content gets executed as part of DOM (Document Object Model) creation, whenever the victim's browser parses the HTML page.
   
   The malicious content sent to the web browser often takes the form of a segment of JavaScript, but may also include HTML, Flash or any other type of code that the browser may execute. The variety of attacks based on XSS is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to web content controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.
   
   
   
   function toggleSys() {
       var sys = $.cookies.get('sys') || false;
       sys = !sys;
   
       var exDate = new Date();
       exDate.setDate(exDate.getDate() + 365);
   
       $.cookies.set('sys', sys, {'path':'/', 'expiresAt':exDate.toUTCString()});
       **window.location = window.location;**
   }
   
   could you give some solution?
   please
   
   br.
   Qiu lu
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services