login password #69

Closed
opened 2024-03-08 15:59:48 +01:00 by Maxime · 4 comments
Owner

j'ai fait du "test driven dev"

et me suis rendu compte que si le password contenait un caractère spcécial (% par exemple), ma fonction récupérait un String null

de plus dans le cas d'autres caractères spéciaux (^) une réponse en html est envoyée :

HTTP Status 400 – Bad Request


Type Exception Report

Message Invalid character found in the request target [/login?identifier=2&password=student^ ]. The valid characters are defined in RFC 7230 and RFC 3986

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Exception

java.lang.IllegalArgumentException: Invalid character found in the request target [/login?identifier=2&password=student^ ]. The valid characters are defined in RFC 7230 and RFC 3986
	org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:482)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:264)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
	org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.base/java.lang.Thread.run(Thread.java:1583)

Si vous avez des idées concernant la provenance (front) je suis cho (je vais check de mon coté aussi )

j'ai fait du "test driven dev" et me suis rendu compte que si le password contenait un caractère spcécial (% par exemple), ma fonction récupérait un String null de plus dans le cas d'autres caractères spéciaux (^) une réponse en html est envoyée : <body> <h1>HTTP Status 400 – Bad Request</h1> <hr class="line" /> <p><b>Type</b> Exception Report</p> <p><b>Message</b> Invalid character found in the request target [&#47;login?identifier=2&amp;password=student^ ]. The valid characters are defined in RFC 7230 and RFC 3986</p> <p><b>Description</b> The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). </p> <p><b>Exception</b></p> <pre>java.lang.IllegalArgumentException: Invalid character found in the request target [&#47;login?identifier=2&amp;password=student^ ]. The valid characters are defined in RFC 7230 and RFC 3986 org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:482) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:264) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.base&#47;java.lang.Thread.run(Thread.java:1583) </body> Si vous avez des idées concernant la provenance (front) je suis cho (je vais check de mon coté aussi )
Maxime added the
Bug
label 2024-03-08 15:59:48 +01:00
Owner

c'est front ou back ?

c'est front ou back ?
Owner

(Happy #69 th issue tho)

(Happy #69 th issue tho)
Author
Owner

c'est plus backend en soi mais en gros dans le header du password, si il y a un caractère spécial ça me donne null dans ma fct backend

c'est plus backend en soi mais en gros dans le header du password, si il y a un caractère spécial ça me donne null dans ma fct backend
tonitch added this to the Tonitch's TODO project 2024-03-08 22:00:53 +01:00
Maxime modified the project from Tonitch's TODO to Max's TODO's 2024-03-09 00:50:57 +01:00
Maxime modified the project from Max's TODO's to Tonitch's TODO 2024-03-09 00:51:02 +01:00
Maxime modified the project from Tonitch's TODO to Max's TODO's 2024-03-09 00:51:04 +01:00
Maxime modified the project from Max's TODO's to Tonitch's TODO 2024-03-09 00:51:28 +01:00
Author
Owner

À été fix en déplaçant les paramètres pour la connexion vers le body !

À été fix en déplaçant les paramètres pour la connexion vers le body !
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PGL/Clyde#69
No description provided.