linshare icon indicating copy to clipboard operation
linshare copied to clipboard

The request was rejected because the URL contained a potentially malicious String ";"

Open georgej77 opened this issue 5 years ago • 2 comments

HI, I'm getting below Error When I run the user interface "http://linshare-user.local/linshare" on browser. There is no issue for accessing administration interface. Can you help me to resolve it.

Linshare version : linshare-ui-user-4.1.0 Product version : 4.1.0

O/S : Red Hat Enterprise Linux release 8.3

======http://linshare-user.local/linshare/;jsessionid=87F97D4DF98249B7A54E9D59076F4803========== HTTP Status 500 – Internal Server Error Type Exception Report

Message The request was rejected because the URL contained a potentially malicious String ";"

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL contained a potentially malicious String ";" org.springframework.security.web.firewall.StrictHttpFirewall.rejectedBlocklistedUrls(StrictHttpFirewall.java:456) org.springframework.security.web.firewall.StrictHttpFirewall.getFirewalledRequest(StrictHttpFirewall.java:429) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:196) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) Note The full stack trace of the root cause is available in the server logs.

Apache Tomcat/9.0.43

Thanks, JInju

georgej77 avatar Mar 17 '21 14:03 georgej77

Hi,

To prevent tomcat to use cookie in the URL with the ";" character, you should disable this behaviour: sed -i -e '/<session-config>/ a\ <tracking-mode>COOKIE</tracking-mode>' /usr/local/tomcat/conf/web.xml You obvioulsy use the proper path for this config file according to your installation.

In order to access to the user interface, you should try to access to "http://linshare-user.local/" instead of http://linshare-user.local/linshare" which is the landing page of the backend (no other interface there at all.)

Regards, Fred.

fmartin-linagora avatar Mar 17 '21 14:03 fmartin-linagora

Hi Fred,

It's resolved without any change.

[image: image.png]

Thanks Jinju

On Wed, Mar 17, 2021 at 8:05 PM Frédéric MARTIN @.***> wrote:

Hi,

To prevent tomcat to use cookie in the URL with the ";" character, you should disable this behaviour: sed -i -e '// a\ COOKIE' /usr/local/tomcat/conf/web.xml You obvioulsy use the proper path for this config file according to your installation.

In order to access to the user interface, you should try to access to " http://linshare-user.local/" instead of http://linshare-user.local/linshare" which is the landing page of the backend (no other interface there at all.)

Regards, Fred.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linagora/linshare/issues/159#issuecomment-801135124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ6OJARIMGGDZ3TGWRP2DCTTEC43VANCNFSM4ZKUYWWA .

georgej77 avatar Mar 18 '21 05:03 georgej77