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

SMTP URL doesn't support # in password #1532

Closed
bernardolk opened this issue Jul 12, 2021 · 6 comments
Closed

SMTP URL doesn't support # in password #1532

bernardolk opened this issue Jul 12, 2021 · 6 comments
Labels
stale Feedback from one or more authors is required to proceed.
Milestone

Comments

@bernardolk
Copy link

bernardolk commented Jul 12, 2021

Describe the bug

Whenever trying to use the email courier with a SMTP URL where the credentials (password) requires a hashtag, it won't work, possibly because of this line of code:

i := strings.IndexByte(s, '#')

Reproducing the bug

Steps to reproduce the behavior:

Expected behavior

For the code to parse correctly the password section of the SMTP URL and if it's not possible to have a particular character, emit an error message explaining that it encountered this problem.

Environment

  • Version: v0.6.6
  • Environment: Terraform + Helm Charts, k8s
@aeneasr
Copy link
Member

aeneasr commented Jul 12, 2021

Try the url encoded form %23

@bernardolk
Copy link
Author

I've tried, but then google will give bad credentials.
Also, if my password has %23 exactly, how would it differentiate between a # and literal %23? For the email part it makes all the sense since special characters are invalid.

@aeneasr
Copy link
Member

aeneasr commented Jul 27, 2021

You would supply url encoding, which encodes to % to %25 so you would end up with %2523`. Please read more about urlencoding: https://www.w3schools.com/tags/ref_urlencode.ASP

Someone else had a similar problem and there the encoding worked: #1539 (reply in thread)

It's also a bit confusing that urlencoding it doesn't work, as it would skip the linked code

i := strings.IndexByte(s, '#')

because %23 would be converted to # later.

I wouldn't supply your password to this website, but you should try to url encode the password using https://www.urlencoder.org

Maybe you have made a typo by mistake which caused the urlencoded password to fail.

@aeneasr
Copy link
Member

aeneasr commented Jul 27, 2021

The best way to prove your suspicion would be to add a failing test case to https://github.com/Zippersk/kratos/blob/master/driver/config/config_test.go which proves that hashtags in passwords (urlencoded) do not work - then we can supply a fix :)

@bernardolk
Copy link
Author

@aeneasr thanks for the reply. I will have to replace the SMTP configurations soon, so I can test that again when I get to it (probably next week).

@aeneasr aeneasr added this to the v0.10.0-alpha.1 milestone Mar 7, 2022
@zepatrik zepatrik changed the title SMTP URL doesn't support hashtags in password SMTP URL doesn't support # in password Mar 16, 2022
@aeneasr aeneasr modified the milestones: v0.10.0-alpha.1, v1.0.0 May 30, 2022
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas on how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan for resolving the issue.

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️

@github-actions github-actions bot added the stale Feedback from one or more authors is required to proceed. label Jul 3, 2023
@github-actions github-actions bot closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Feedback from one or more authors is required to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants