Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shibboleth - 1.3.2.6. No mail header #1081

Open
5 tasks
kosarko opened this issue Nov 14, 2023 · 6 comments
Open
5 tasks

Shibboleth - 1.3.2.6. No mail header #1081

kosarko opened this issue Nov 14, 2023 · 6 comments

Comments

@kosarko
Copy link
Member

kosarko commented Nov 14, 2023

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 #1066 (comment)

The rest of the use case remains untested:

  • send verification
  • welcome login
  • logout -> login again, no mail prompt
@kosarko
Copy link
Member Author

kosarko commented Dec 8, 2023

  • 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" (edit: this is now Disable the email field after sending an email in the shibboleth no email flow #1131 )
  • the email received has no subject and the variables in it are not interpolated (edit: was fixed meanwhile)
  • 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
Copy link
Member Author

kosarko commented Feb 28, 2024

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)

@milanmajchrak
Copy link
Collaborator

milanmajchrak commented Nov 4, 2024

Should be done here:
dataquest-dev#644
dataquest-dev#772

Tracked conversation: dataquest-dev/dspace-angular#591

@kosarko
Copy link
Member Author

kosarko commented Nov 7, 2024

@milanmajchrak I'm having an issues with this, I'm stuck at a white page with running dots... See the attached video

LINDAT_CLARIAH-CZ.Repository.Home.-.Brave.2024-11-07.13-30-52.mp4

(I'm getting the verification token from dspace logs as the system is currently set not to send emails)

Edit
The version:
BE: Git hash: 68fb2030c514d92930980064d1f3cb0373c48de4 Date of commit: 2024-11-04 12:43:04 +0100This info was generated on: 2024-11-04 12:48:38 CET+0100 Build run: https://github.com/dataquest-dev/DSpace/actions/runs/11663529816

FE:

Git hash:
bd553228ea91c88ca0e2109b4c0d7033df50e43c
Date of commit:
2024-11-04 14:23:22 +0100
This info was generated on:
2024-11-04 14:23:40 CET+0100

Build run:
https://github.com/dataquest-dev/dspace-angular/actions/runs/11665121758

Release link:
https://github.com/dataquest-dev/dspace-angular/releases/tag/none-2024.11.11665121758 (if it does not work, then this is not an official release instance)

@kosarko
Copy link
Member Author

kosarko commented Nov 12, 2024

@milanmajchrak jinej problem je, ze te to necha se prihlasit bez potvrzeni toho mailu (bez pouziti toho linku). Vyplnim nejakej mail, vratim se na /repository, pouziju stejnyho idp, stejny credentials a dostanu se dovnitr.

LINDAT_CLARIAH-CZ.Repository.Home.-.Brave.2024-11-12.11-13-46.mp4

@kosarko
Copy link
Member Author

kosarko commented Nov 13, 2024

@milanmajchrak I'm having an issues with this, I'm stuck at a white page with running dots... See the attached video
....

@milanmajchrak tohle se chova jinak pokud mam frontend pustenej jako yarn start a yarn start:dev (v configu mam backend nastavenej na dspace-dev, beru url z mailu a akorat vymenim domenu za localhost:4000). Pri devu se to nezasekne (sice jsem taky dostal nejakej error, ale to uz muze byt ledaccos, FE na localhost link uz jsem pouzil nekolikrat...)

Pri prod se to zasekne stejne...navic v cli pak vidim:

ERROR TypeError: Invalid character in header content ["Authorization"]
    at ClientRequest.setHeader (node:_http_outgoing:651:3)
    at new ClientRequest (node:_http_client:291:14)
    at Object.request (node:https:366:10)
    at XMLHttpRequest3._sendHxxpRequest (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:2159782)
    at XMLHttpRequest3._sendHttp (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:2159599)
    at XMLHttpRequest3.send (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:2157723)
    at Observable2._subscribe (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:2813070)
    at Observable2._trySubscribe (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:1780333)
    at /tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:1780225
    at Object.errorContext (/tmp/junk/temporary/new/dspace-angular/dist/server/main.js:7:1985815) {
  code: 'ERR_INVALID_CHAR'

coz nevim, jestli souvisi...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants