cookie domain set ip


項目原先部署在tomcat6下面被甲方掃出漏洞要求整改,移植到tomcat9后登錄莫名出現
An invalid domain was specified for this cookie


在網上找了很多資料也是讓修改成合法的域名說tomcat8.5開始解析cookie變了,但是無論怎么修改代碼中的域名均無效,后來找到了一篇老外寫的文章,按其中的方法很快解決。ps:老外就是牛x
Set tomcat to use LegacyCookieProcessor (because Rfc6265CookieProcessor complies with RFC6265 which does not allow domains beginning with non-alphanumeric characters):�0�2


1. Edit the Tomcat/conf/content.xml�0�2


2. Add the statement in betweeen the <context> and </context> tags:�0�2


<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />�0�2


3. Restart Tomcat.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM