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

Undocumented parameter for sendConfirmation #38

Closed
paskal opened this issue Oct 20, 2019 · 4 comments
Closed

Undocumented parameter for sendConfirmation #38

paskal opened this issue Oct 20, 2019 · 4 comments

Comments

@paskal
Copy link
Collaborator

paskal commented Oct 20, 2019

Hello!

Lines 141-145 in verify.go (added in #24):

// GET /login?site=site&&user=name&address=someone@example.com
//<...>
Handshake: &token.Handshake{
	State: "",
	From:  r.URL.Query().Get("from"),
	ID:    user + "::" + address,
},

That from field reading is not covered by documentation and is not tested. Readme has different signature listed:

GET /auth/<name>/login?user=<user>&address=<adsress>&aud=<site_id>&from=<url>

It's not clear to me that this "from" URL parameter is send now (as it called just as e.sendConfirmation(w, r) without adding any params), I think code and documentation should be clarified to use it properly or drop it altogether.

@umputun
Copy link
Member

umputun commented Oct 20, 2019

Likely cut-paste artifact from the primary auth flow. I'll dbl check and remove

@paskal
Copy link
Collaborator Author

paskal commented Oct 20, 2019

Another small thing to fix: /login?site=site&&user=name&address=someone@example.com occurs twice in the text, && can be replaced with &.

@umputun
Copy link
Member

umputun commented Oct 20, 2019

can you be more specific pls? occurs where exactly?

@paskal
Copy link
Collaborator Author

paskal commented Oct 20, 2019

Same file verify.go, lines 62 and 133.

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

No branches or pull requests

2 participants