我正在尝试从一个spring控制器检索一个cookie到一个jsp页面的javascript代码。这是控制器代码
@CookieValue(required = true) String data) {
System.out.println("this is the sound cookie value>>>>>> " + data); //this prints the xyz cookie value to the console
现在,在我的jsp页面的javascript中,我尝试以这种方式检索cookie。
var cokdata=
我有一个简单的JS函数,从浏览器的URL检索一些数据。对JS函数的调用是在JSP中进行的。JS函数是从JSP的标记中调用的。
JS函数:
function parseURL(){
var info = "some value", // This is retrieved from the browser URL which is my.JSP
$.ajax({
method: post,
url: my.jsp // This is the same URL (browser URL) from which I am getting inf
在静态分析期间,我的JSP代码中出现了XSS漏洞。实际上,我将请求从我的servlet转发到JSP页面。Requets包含一个JSON字符串。在JSP页面中,我从这个appId对象中检索JSON值。我使用这个XHR值通过appId调用检索更多信息。
<script type="text/javascript">
var appId;
// appContext is JSON string
var appContextStr=<%=request.getParameter("appContext")%>; // XSS Vulenrabi