clarin-dspace icon indicating copy to clipboard operation
clarin-dspace copied to clipboard

Shibboleth - 1.3.2.6. No mail header

Open kosarko opened this issue 1 year ago • 2 comments

Expectation

  • [ ] it accepts valid emails
  • [ ] especially emails with + extension

Actual behavior

no email accepted:

The FE shows some basic "can't send email" error; underneath it gets a 400 bad request from /api/autoregistration

the tomcat logs (cf. #1033 ) contain:

Oct 04 16:27:40 dspace-dev tomcat9[3422607]: Error parsing HTTP request header
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:  Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
Oct 04 16:27:40 dspace-dev tomcat9[3422607]: java.lang.IllegalArgumentException: Invalid character found in the request target [/server/api/[email protected][https://ufal-point-dev.ufal.hide.ms.mff.cuni.cz/idp/shibboleth]&[email protected] ]. The valid characters are defined in RFC 723>Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:271)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
Oct 04 16:27:40 dspace-dev tomcat9[3422607]:     at java.base/java.lang.Thread.run(Thread.java:833)

Is percent encoding (or base64?) of the params a solution?

Originally posted by @kosarko in https://github.com/ufal/clarin-dspace/issues/1066#issuecomment-1747137898

The rest of the use case remains untested:

  • [ ] send verification
  • [ ] welcome login
  • [ ] logout -> login again, no mail prompt

kosarko avatar Nov 14 '23 09:11 kosarko

  • when I confirm an email and the system send the token, the email field should become inactive, or I should be on a page saying "we've sent you an email follow up from there"
  • the email received has no subject and the variables in it are not interpolated
  • clicking link in email show welcome and shibboleth headers; clicking continue takes me to homepage. I see menu on the left but no user name, and also red login button. Hitting f5 shows eula and everything appears ok afterwards

kosarko avatar Dec 08 '23 12:12 kosarko

Tested yesterday; but no email received. There's no trace of an email being sent in dspace logs...

(Note: from the mail server logs it seems that email was actually sent, but bounced. I'd rather not dig through mail server logs to know if dspace actually tried to send and email)

kosarko avatar Feb 28 '24 15:02 kosarko