tolgee / tolgee-platform

Developer & translator friendly web-based localization platform
https://tolgee.io
Other
1.58k stars 150 forks source link

User Invitation Using a Link is Broken #2298

Open AgentOren opened 5 months ago

AgentOren commented 5 months ago

I just tried to invite an existing user to a new project on a self-hosted instance (Version: v3.59.7). When the user tries to login using the link, he receives an "Unexpected error occurred" popup, an the following error is logged:

2024-05-05T11:29:43.935Z  INFO 1 --- [io-8080-exec-21] o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.

java.lang.IllegalArgumentException: Invalid character found in the request target [/v2/invitations/"vPpsTouKJelCvAqWSJfRvGWlzmrFKyzdiKnWakQVUhLxANMXMt"/accept ]. The valid characters are defined in RFC 7230 and RFC 3986
        at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:490) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:264) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.15.jar:10.1.15]
        at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

It seems to me like the quotes around the token in the URL are redundant. I don't remember such behavior in the past, so I suspect it's a regression in recent versions.

stepan662 commented 5 months ago

Hey, does this happen always? I was not able to replicate

AgentOren commented 5 months ago

My specific use case was:

Hope one of the above may assist in reproducing the error.