Skip to content

Email HTML - request URL path segment contains illegal characters #697

Open
@blissjoe

Description

@blissjoe

Describe the bug
Email providers handle the password reset HTML in unpredictable ways. Gmail converts the spaces to c return (%0d) while another provider in Evolution removes them.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Forgotten Password'
  2. Enter Username
  3. Click 'Search'
  4. Click 'Email'
  5. Open email account and 'click here' to continue

Expected behavior
I expect the Token URL to be be valid and allow the user to reset their password.

Additional context
I've excluded most of the token but it gets broken up with a space at, what appears to be, every 59 characters.

  • Gmail - Firefox browser
https://removed.url/pwm/public/forgottenpassword/H4sIAAAAAAAAAAEqAtX9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgeGXmG1sw%0DvH1jXrYakoW4K_mhCBuFEZEklqbAP7a7C4Q-BabOyQSZucVX2p2CL-5g_Ht......

H4sIAAAAAAAAAAEqAtX9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgeGXmG1sw vH1jXrYakoW4K_mhCBuFEZEklqbAP7a7C4Q-BabOyQSZucVX2p2CL-5g_Ht 

The first space is between sw and vH

This link causes the error. I do see this note after the security violation which removes the %0d but it appears to happen out of order - util.Validator, stripped potentially harmful chars from value

2023-03-06T08:20:41Z, ERROR, http.PwmResponse, {hufya} 5063 ERROR_SECURITY_VIOLATION (request URL path segment contains illegal characters) [removed]
2023-03-06T08:20:41Z, WARN , http.PwmHttpResponseWrapper, attempt to write cookie 'ID' after response is committed
2023-03-06T08:20:41Z, WARN , http.PwmHttpResponseWrapper, attempt to write cookie 'SESSION' after response is committed
2023-03-06T08:40:03Z, WARN , util.Validator, stripped potentially harmful chars from value: input=https://removed.url/pwm/public/forgottenpassword/H4sIAAAAAAAAAAEqAtX9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgeGXmG1sw%0DvH1jXrYakoW4K_mhCBuFEZEklqbAP7a7C4Q-BabOyQSZucVX2p2CL-5g_Ht...... strippedOutput=https://removed.url/pwm/public/forgottenpassword/H4sIAAAAAAAAAAEqAtX9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgeGXmG1swvH1jXrYakoW4K_mhCBuFEZEklqbAP7a7C4Q-BabOyQSZucVX2p2CL-5g_Ht......
  • Namecheap email - Evolution Client
https://removed.url/pwm/public/forgottenpassword/H4sIAAAAAAAAAAEeAuH9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgVAtHGtMJosD6NsgwaMDIXNzEBjQwaUJ-ViJquvrQjALf68BJ1D26l4wvAIlGjojKD3P.....

H4sIAAAAAAAAAAEeAuH9UFdNLkdDTTEQcNGQP7Gyw-D-vUqcYYgVAtHGtMJ osD6NsgwaMDIXNzEBjQwaUJ-ViJquvrQjALf68BJ1D26l4wvAIlGjojKD3P 

The first space on this one is between MJ and os

When clicking on this link it works as expected.


It's similar to this other issue - #694

I'm not sure I understand the purpose of the util.Validator or if it's possible to remove the c return between each section of the token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions