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

Remove unused phone PATCH route #7947

Merged
merged 2 commits into from
Mar 14, 2023
Merged

Remove unused phone PATCH route #7947

merged 2 commits into from
Mar 14, 2023

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 8, 2023

DO NOT MERGE until after #7944 has been deployed to production.

🛠 Summary of changes

Follow-up to #7944 (and #7826) to remove the phone creation PATCH route, which has to be removed separately to avoid issues during deployment.

changelog: Internal, Code Quality, Reconcile routes for adding phone
RackAttack throttles for any non-GET request, not specifically on the PATCH method: https://github.com/18F/identity-idp/blob/e10b263/config/initializers/rack_attack.rb#L202
@aduth
Copy link
Member Author

aduth commented Mar 13, 2023

#7944 was deployed in RC 260, so this is no longer blocked.

patch '/phone_setup', headers: { REMOTE_ADDR: '1.2.3.4' }
post '/phone_setup', headers: { REMOTE_ADDR: '1.2.3.4' }
Copy link
Member Author

Choose a reason for hiding this comment

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

As mentioned in the extended commit message, this is fortunately not cause for concern, since throttling applies to any non-GET request:

req.remote_ip if req.path.match?(%r{/add/phone|/phone_setup}) && !req.get?

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@aduth aduth merged this pull request into main Mar 14, 2023
@aduth aduth deleted the aduth-rm-phone-patch-route branch March 14, 2023 12:13
mitchellhenke pushed a commit that referenced this pull request Mar 14, 2023
* Remove unused phone PATCH route

changelog: Internal, Code Quality, Reconcile routes for adding phone

* Update spec method

RackAttack throttles for any non-GET request, not specifically on the PATCH method: https://github.com/18F/identity-idp/blob/e10b263/config/initializers/rack_attack.rb#L202
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

Successfully merging this pull request may close these issues.

2 participants