精华内容
下载资源
问答
  • SpringBoot整合ng-alain...org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized. at org.springframework.security.web.firewal...

    SpringBoot整合ng-alain时报错如下:

    org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized.

    org.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.1.RELEASE.jar:5.1.1.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:194) ~[spring-security-web-5.1.1.RELEASE.jar:5.1.1.RELEASE]
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.1.RELEASE.jar:5.1.1.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.2.RELEASE.jar:5.1.2.RELEASE]
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.12.jar:9.0.12]
    	at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
    
    
    

    查看源码springStrictHttpFirewall.java中报错源码如下:
    在这里插入图片描述

    判断逻辑在isNormalized(request)函数中,如果请求路径中包含双斜杠//,则会抛出这样的错误。
    在这里插入图片描述

    查看我们的请求,请求中确实包含如下路径:
    在这里插入图片描述

    参照 https://stackoverflow.com/questions/48453980/spring-5-0-3-requestrejectedexception-the-request-was-rejected-because-the-url/49116274 解决方案,通过自定义Firewall的方式允许URL中出现斜杠slash

    @Bean
    public HttpFirewall allowUrlEncodedSlashHttpFirewall() {
        StrictHttpFirewall firewall = new StrictHttpFirewall();
        firewall.setAllowUrlEncodedSlash(true);    
        return firewall;
    }
    

    添加之后,正常访问
    在这里插入图片描述

    展开全文
  • 在升级security时报了一个错:The request was rejected because the URL was not normalized。 字面意思是:不是正规的URL请求被拒绝。 有可能是“/getUser”写成了“//getUser”等类似的不正规的url。 因为security...

    背景问题

    在升级security时报了一个错:The request was rejected because the URL was not normalized。
    字面意思是:不是正规的URL请求被拒绝。
    有可能是“/getUser”写成了“//getUser”等类似的不正规的url。
    因为security升级后对url校验更加严格了,我这边是从4.2.3.RELEASE升级到4.2.9.RELEASE

    org.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:248)
    	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:194)
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
    	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    

    解决方案

    在这里插入图片描述
    在上图红框那行代码打断点,然后看request里面跳转的url是否为不正规的url。
    我这边断点显示跳转首页的url是 //index.jsp 应该是 “ /index.jsp ”
    于是就在我的过滤器拦截跳转的地方将 “ / ” 去掉。
    wel.xml改成了如下:

    <welcome-file-list>
    	<welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    

    修改完后再去请求首页就可以正常跳到登陆界面了。

    展开全文
  • 升级spring boot 1.5.10.RELEASE 版本后,突然发现之前能Nginx...org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized. at org.sp

    升级spring boot 1.5.10.RELEASE 版本后,突然发现之前能Nginx代理能请求的地址抛如下异常:

    org.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:123)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:193)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.lang.Thread.run(Thread.java:748)

    经过查找。

    之前spring 版本中访问路径目录中出现http://ip/xxx//xx 这样访问 // 可以被处理访问。

    spring boot 1.5.10.RELEASE 版本后 这样访问 // 可以被处理访问 就会出现上边异常

    展开全文
  • The request was rejected because the URL was not normalized. 原因很简单,你的某个URL写的时候写成“//”这样子了,举个栗子 admin//admin/admin.HTML 绝对会报以上的错。 ...

    The request was rejected because the URL was not normalized.
    在这里插入图片描述

    原因很简单,你的某个URL写的时候写成“//”这样子了,举个栗子

    admin//admin/admin.HTML

    绝对会报以上的错。

    检查所有的相关的URL:

    改成“/”

    展开全文
  • Spring 5.0.3 RequestRejectedException: The request was rejected because the URL was not normalized spring security配置拦截请求报错:不是正规的URL请求被拒绝。 解决办法: Spring security文档提到请求...
  • E/flutter (17545): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: ServicesBinding.defaultBinaryMessenger was accessed before the binding was initialized. E/flutt...
  • 注意:spring boot 1.5.10.RELEASE 版本后 ,类似ip:port//resources 这样访问 // 可以被处理访问 就会出现上边异常。修改客户端请求中的//即可。
  • Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.elasticsearch.transport.netty4.Netty4InternalESLogger.<init>(Ne...
  • org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL was not normalized. at org.springframework.security.web.firewall.StrictHttpFirewall....
  • 基础连接已经关闭: 连接被意外关闭。 基础连接已经关闭: 发送时发生错误 防火墙问题。或是杀毒软件,卫士之类的。(360 卸载 ) 转载于:https://www.cnblogs.com/runliuv/p/11212533.html...
  • org.apache.commons.fileupload.FileUploadException: the request was rejected because no multipart boundary was found at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<...
  • The first result from the daemon was empty.

    千次阅读 2016-06-03 16:49:36
    AndroidStudio Gradle时报错:Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection.解决办法:dos窗口输入jps :查看java进程。 tskill...
  • http://blog.tangcs.com/2008/11/28/firefox-connection-interrupted/ 转载于:https://www.cnblogs.com/WarrenTang/archive/2008/11/28/1343580.html
  • 当服务器异常退出后,在下一次登陆时会出现如下问题,这种情况应该是服务器IP变了,而vnc还在监听原来的IP上的数据: 解决方法: ... 2.在命令行中输入vncserver,命令行中出现: ...Warning: optimal6:2 is taken ...
  • 1、报错信息Communications ...The last packet successfully received from the server was 510,815 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. 2、报错原因1、My
  • the process was ended forcefully.

    千次阅读 2020-05-19 09:54:53
    在在开始运行的时候出现:the process was ended forcefully! 使用F5调试出现 during startup program exited with 0xc0000135 需要将库文件拷贝到debug路径下才行。
  • 最近线上日志报错: 0:Communications link ... The last packet successfully received from the server was 87,537,289 milliseconds ago. The last packet sent successfully to the server was 0 millis...
  • Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection solved the problem by doing the following go to c:/Users/Jack/.gradle/daemon/
  •  The request sent by the client was syntactically incorrect的字面意思是:客户端发送的请求在语法上是错误的。 这个提示不够详细,看了一下后台,后台给的部分提示如下: Failed to convert from type java....
  • The connection to the server localhost:8080 was refused - did you specify the right host or port? 原因: kubenetes master没有与本机绑定,集群初始化的时候没有设置 解决办法(执行以下命令): ...
  • The requested URL was not found on the server

    万次阅读 2017-11-06 10:01:49
    问题重现: curl的时候带了了一个...The requested URL was not found on the server 原因是什么呢? 因为部署这个web框架的python文件中没有 类似于 @app.route('/api/resource', methods=['POST']) 的语句以及
  • the zipalign tool was not found in the sdk

    千次阅读 2014-09-05 14:01:06
    Elicpse更新sdk和adt之后,打包出错,提示 the zipalign tool was not found in the sdk
  • Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets...
  • catkin_ws/src/seven_dof_arm_gazebo/launch/grasp_world.launch] requires the 'world_name' arg to be set The traceback for the exception was written to the log file 参考:https://github.com/ros-sim...
  • 问题:Application Error - The connection to the server was unsuccessful.(file://android-asset/www/index.html)解决:参考原网址:...
  • 一般遇到这种情况是由于当前虚拟机资源中的资源文件被其他进程占用导致的。如果你的系统中有 DAEMON Tools Lite 软件,那么多半是因为这个原因。因此下面针对此情况提出两种解决办法:1. 检查有无安装 DAEMON Tools...
  • type Status report ...description The request sent by the client was syntactically incorrect (). Apache Tomcat/7.0.27  自从使用spring mvc框架后,就频繁遭遇这个问题。刚开始一般都是表单的n
  • 描述:ubuntu下打开jee luna,使用的以前使用过的一个workspace(里头有写过的一些...org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state l

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 768,720
精华内容 307,488
关键字:

thewas