The request was rejected because the URL was not normalized.解决方案
背景
在单点登录配置url的时候,访问一个url的时候会报如下的错误
2021-05-24 18:28:03.163 ERROR 17350 --- [nio-8082-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/auth] threw exceptionorg.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized.at org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:296) ~[spring-security-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE]at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:194) ~[spring-security-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE]at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.7.RELEASE.jar!/:5.1.7.RELEASE]at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.13.RELEASE.jar!/:5.1.13.RELEASE]at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_231]at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_231]at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.30.jar!/:9.0.30]at java.lang.Thread.run(Thread.java:748) [na:1.8.0_231]
经过查询资料发现,是因为url不规范导致的,一般的浏览器会把多个//变换成一个,但是cas校验的时候会识别出来错误
记录下来,以后备查
The request was rejected because the URL was not normalized.解决方案相关推荐
- SpringBoot整合升级Spring Security 报错 【The request was rejected because the URL was not normalized】...
前言 最近LZ给项目框架升级, 从Spring1.x升级到Spring2.x, 在这里就不多赘述两个版本之间的区别以及升级的原因. 关于升级过程中踩的坑,在其他博文中会做比较详细的记录,以便给读者参考 ...
- SpringBoot【The request was rejected because the URL was not normalized】
SpringBoot整合ng-alain时报错如下: org.springframework.security.web.firewall.RequestRejectedException: The r ...
- SpringBoot 提示:RequestRejectedException:The request was rejected because the URL was not normalized.
今天遇到一个问题:本地磁盘通过SpringMVC 资源映射成URL地址可以访问的资源,提示如下错误信息: RequestRejectedException:The request was reject ...
- The request was rejected because the URL was not normalized【翻译】
Spring 5.0.3 RequestRejectedException: The request was rejected because the URL was not normalized s ...
- The request was rejected because the URL was not normalized
背景问题 在升级security时报了一个错:The request was rejected because the URL was not normalized. 字面意思是:不是正规的URL请求 ...
- The request was rejected because the URL contained a potentially malicious String “//“
报错详情 org.springframework.security.web.firewall.RequestRejectedException: The request was rejected be ...
- The request was rejected because the URL contained a potentially malicious String “;“问题的正确解决姿势
问题的复盘 首先这个问题出现的时机是,当用户访问特定的连接(如http://localhost/index)时没有权限,被重定向到登录页面http://localhost/login.为了登录成功后再 ...
- The request was rejected because the URL contained a potentially malicious String “%2e“
日志出现: [http-nio-80-exec-3] ERROR o.a.c.c.C.[.[localhost].[/].[dispatcherServlet] - Servlet.service() ...
- web.firewall.RequestRejectedException: The request was rejected because the URL contained a potentia
spring security 自带url 校验失败 因为请求的url不合法,但是对接方又不能修改,只能平台适配 org.springframework.security.web.firewall.R ...
最新文章
- 一行命令堆出你的新垣结衣,不爆肝也能创作ASCII Art
- 客户端oracle12537连接关闭,ORA-12537:TNS:连接关闭 和 TNS-12547: TNS: 丢失连接
- Java代码在计算机中的三个阶段与反射
- kaldi在java中运行_ubuntu下kaldi的安装以及实例的运行
- 你将被重新带回到 那个燃烧彼此的世界
- spring boot+mybatisplus集成后访问项目接口404
- 计算机会计综合作业,20年7月东财《通用财务软件X》综合作业(100分)
- php的事务没有结束,PHP PDO – 没有活动事务
- 为什么我得到javafx.fxml.LoadException甚至fxml文件的路径都是正确的
- QT tablewidget列名字对应的行与第0行之间的边框线未显示
- 学习了Python大数据之后,将来主要做什么
- 【交换机在江湖】实战案例二十九 MSTP配置示例
- java 对象判断null_Java判断对象是否为null的方法
- suse linux 添加网卡驱动,图文并茂介绍suse linux 11系统安装全过程以及suse系统下安装网卡驱动和刷新固件.doc...
- Sdut PTA练习 2021级-JAVA01 Java入门
- 以德治国——《万历十五年》的读书笔记及读后感想2900字
- [历史随笔]帝国如风--元朝的另类历史
- ASPICE_SWE.1_01_01_QA
- 全志A10/A20 nand flash系统开发
- HDU2040有一楼梯共M级,刚开始时你在第一级
热门文章
- 华为交换机堆叠如何进行主备倒换
- matlab表示函数波形,matlab如何画冲激函数波形 matlab画冲激函数波形的方法
- javaweb JAVA JSP学校宿舍公寓管理系统(JSP宿舍管理系统)java寝室管理网站源码
- python的发明者会几种编程语言_编程语言简史: 有人不喜欢花括号, 于是他发明了 Python...
- CUGBACM22级暑假小学期训练-简单构造
- Apache-Ignite-中文文档
- 给我未来的孩子的一封信
- 单端转差分电路详解(1)
- 风机的在线智能监测,让风机“健康”地被吹
- pcm to g711