Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Checkmarx Client_Reflected_File_Download security vulnerability

$
0
0

Hi Checkmarx has detected a security vulnerability in the code: Cross-domain 'jsonp' ajax call not XSS safe. The suggestion given as: An explicit file name is not defined for the Content-Disposition header. Filename attribute is required in order to prevent the browser from assuming the resource is an executable and download a possibly malicious file." T

The code works fine but security tool has identified this.

$.ajax({
 url:"https://www.example.com?format=rich&client=aem_frontend",
 dataType:"jsonp",
 data:"&q="+ request.term,
 success:function(data){
  $('.searchPanel').css('display','none');if(data.results.length >0){
   response($.map(data.results,function(item){return{
     label: item.name}}));}else{
   $('.ui-autocomplete ').css('display','none');
   $('.searchPanel').css('display','block');
   $('.searchPanel').css('display','block');// $('#zero-result').removeClass("noDisplay").css('display','block');//$('#err_text').text("Whoops! We couldn’t find any matches for "+request.term);}},
 error:function(data){
  alert("inside failure"+ data.status +' '+ data.statusText);}});




Regards Vaibhav Kaulkar


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>