dwr寫demo的時候遇到的一個問題,跳出session error問題描述:前臺頁面跳出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的配置
加入corssDomainSessionSecurity這個配置選項..這個參數是在dwr版本2.0才有的.默認值為true,也就是
禁止其他域發送請求.corssDomainSessionSecurity:設置成false能夠從其他域進行請求.注意這樣做會在安全性上有一些冒險.
posted on 2007-11-01 14:06 李云澤 閱讀(563) 評論(0) 編輯 收藏 所屬分類: DWR(Ajax)
Powered by: BlogJava Copyright © 李云澤