Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Printf debugging for MSISDN validation #11882

Merged
merged 5 commits into from
Feb 8, 2022

Conversation

DMRobertson
Copy link
Contributor

I propose committing this, running it on m.org's master for a bit, then reverting once we're sufficiently confident in the results.

@DMRobertson DMRobertson requested a review from a team as a code owner February 1, 2022 19:45
@babolivier babolivier self-assigned this Feb 3, 2022
Copy link
Contributor

@babolivier babolivier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also CI is failing

Comment on lines 471 to 474
# Didn't like the sound of logging `client_secret`, but the spec says it is
# "A unique string generated by the client, and used to identify the validation
# attempt." I.e. something to facilitate deduplication. I don't think it's a
# sensitive secret per se.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not so much used to deduplicate but rather to make sure the next request(s) come from the client that started the process. I'm not sure what amount of harm can be done if someone gets a hold of someone else's client secret, but my paranoid self would prefer being cautious and not logging it if we don't need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I didn't grok that it was to be sent in another request.

@@ -518,6 +525,7 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
threepid_send_requests.labels(type="msisdn", reason="add_threepid").observe(
send_attempt
)
logger.info("MSISDN %s is already in use by %s", msisdn, existing_user_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look like it's in the right place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, looks like a copy paste fail. thanks.

@babolivier
Copy link
Contributor

I'm assuming the CI failing might fixed by #11906

Copy link
Contributor

@babolivier babolivier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failing isn't related to this PR, let's not block it on that.

@DMRobertson DMRobertson merged commit ed2f158 into matrix-org-hotfixes Feb 8, 2022
@DMRobertson DMRobertson deleted the dmr/msis-debug-n branch February 8, 2022 12:57
DMRobertson pushed a commit that referenced this pull request Feb 10, 2023
DMRobertson pushed a commit that referenced this pull request Feb 13, 2023
* Apply logging from hotfixes branch to develop

Part of #4826.

Originally added in #11882.

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

Successfully merging this pull request may close these issues.

2 participants