问题描述:
算是一个最简单的dwr的入门demo.也是按照dwr的入门demo写的.但是在运行的时候却出现了下面的问题.
前台页面跳出session error的对话框,而控制台则输出:
2007-5-29 11:58:53 org.directwebremoting.util.CommonsLoggingOutput error
严重: A request has been denied as a potential CSRF attack.
的错误信息:请求被拒绝因为可能存在csrf(cross-site request forgeries,跨站请求伪造)攻击.
也就是说页面URL可能被跨站了的服务所调用.
例如:自己页面的一个图片.可能被其他站直接通过[img]....[/img]来引用.
后来上网找到了解决方法:
在web.xml配置文件中.dwr的配置
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
加入corssDomainSessionSecurity这个配置选项..这个参数是在dwr版本2.0才有的.默认值为true,也就是禁止其他域发送请求.corssDomainSessionSecurity:设置成false能够从其他域进行请求.注意这样做会在安全性上有一些冒险.
转自【http://www.blogjava.net/jxhkwhy/archive/2007/10/21/154803.html】
分享到:
相关推荐
解决crosswalk23版本 request was denied for security 异常,原因是 https服务器SSL证书是自签名的 导致部分android机报错,现修改crosswalk代码以做到支持。附件分为eclipse与studio版本
处理搭建好LNMP环境之后,呈现了Access Denied错误 搭建好LNMP环境之后,呈现了Access Denied错误,现已扫除掉文件权限的问题也扫除掉是Nginx的问题,而是无法解析PHP的问题。 发现网上的很多大牛都是经过Nginx的...
crosswalk最新版本23.53.589.4aar包。加载https资源时出现Requst was denied for security 和ERR_SECURITY_RESPONSE异常。修改源码中的SslUtil后可以正常使用。
Delphi ftp 报Permission denied 问题.txt.Delphi ftp 报Permission denied 问题.txt
Ghost Software and Altiris to develop programs that can change a computer‘s SID after a system has been cloned. However, PowerQuest‘s SID Changer and Ghost Software‘s Ghost Walker are only sold as...
over the claim that qmail has no security fl aws yet discovered, it cannot be denied that its security track record over the last ten years is unparalleled. Qmail includes several applications, ...
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决: 1.打开在创建mysql容器时挂载的conf目录下的mysqld.cnf(如下文件) 我创建docker的姿势 2.进入mysqlId.cnf文件中在...
domino在发外网邮件时,mail.box中报错:SMTP Protocol Returned a Permanent Error 554 Relay access denied
###yDB:基于 RTM 的高性能、可扩展的内存键值存储团队成员:Zhiyuan Yang、Zhizhou Yang ###SUMMARY 我们基于英特尔 RTM(受限事务内存)和乐观并发控制 [2] 实现了一个名为 yDB 的内存键值存储。...
tomcat9用户访问配置问题_403Access Denied,无法访问server、Manager、Host Manager,这是我花了好久时间才搞好的,网上都没有完整能用版,希望对你有帮助,欢迎下载
NULL 博文链接:https://vernonchen163.iteye.com/blog/1995514
There has been a sharing violation. The source or destination file may be in use. The file is in use by another program or user. Make sure the disk is not full or write-protected and that the file is ...
手机图案解锁 permission denied解决方案
sqlplus libclntsh.so.11.1 Permission denied 解决方法
首先是不知道怎么忽然mysql用命令行,workbench都登录不了,都提示’Access denied for user ‘root’@’localhost’。 数据库卸载重装了几次都不行。好像感觉数据清理不干净。解决的过程遇到的坑,这里记录分享下。...
[Ubuntu][架站][教學]_Apache設定#09._如何簡單的搞砸系統安全性(Directory,_denied,_gr
If a new file or directory is created, it inherits all the permissions, the GID and the UID from the directory where it has been created. There is one exception to this rule: a file (but not a ...
首先我要解释一下,很多时候出现这个问题,并不是你的文件有毛病,很...import os.path as osp import imgviz import PIL.Image from labelme.logger import logger from labelme import utils import cv2 from math
NULL 博文链接:https://lanxing.iteye.com/blog/264088
附件是在使用Git过程中遇到的Permission Denied Publickey的问题,之前把该问题组织成一个文档了。