Repository navigation
System Safety: close the instant route to a weaker auth tier, and gate the name switch like the privacy switch - #380
Merged
Conversation
…e the name switch like the privacy switch The standalone PUT /v1/systems/me/delete-confirmation endpoint verified the password and wrote the tier straight onto the row, while the same change through PATCH /v1/system/safety was deferred behind the grace window as a cancellable pending change. A weaker tier is a weaker step-up on every gate that asks for one, so this was the one call that got past all of them at once. The endpoint now goes through the same split: raising applies at once, lowering waits out the window (or lands at once when the window is 0), and the pending change is listed and cancellable like any other loosening. The response is still the system as it stands, so a deferred lowering reads the old tier. Marked deprecated in favour of the settings PATCH, which reports applied and deferred. The settings PATCH, this endpoint and the native import now share one helper, `apply_safety_split`, so the three cannot disagree about which direction waits. The native import applied `show_name_publicly` from the file as a plain display setting. Turning it on with the system public and a grant live is a raise that PATCH /v1/systems/me demands step-up for, which an import cannot give, so it now holds in that case and under the operator publishing block, with a report line, the same shape as the system privacy hold. Hiding, and restoring with nothing published, apply as before. Showing the name on PATCH /v1/systems/me now meets the same refusals as raising privacy to public: pending deletion, the instance's public surface off, and the operator takedown latch. Set while any of those held, it would have taken effect when the surface came back. It is also recorded in the security log as an exposure raise under its own source.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to a read-through of every edge where an owner can make information more visible. The exposure gates themselves held up; this fixes the three things found underneath them.
PUT /v1/systems/me/delete-confirmationwrote the tier directly after a password check, whilePATCH /v1/system/safetydeferred the same lowering behind the grace window. A session with the password could drop the tier tononein one call and every step-up after that checked nothing. The old endpoint now goes through the same split: raising applies at once, lowering is queued as a pending change (or applies at once with no window), visible and cancellable onGET /v1/system/safety. Response shape is unchanged, so a deferred lowering reads the old tier. Marked deprecated in favour of the settings PATCH. All three write paths to the safety columns (settings PATCH, this endpoint, native import) now shareapply_safety_split, so there is one place the direction rule lives.show_name_publiclyfrom a backup was applied as a plain display setting. Turning it on with the system public and a grant live is a raise that needs step-up on the owner path, so the import now leaves the name hidden in that case and under the operator publishing block, with a report line, the same shape as the existing system-privacy hold. Hiding, or restoring with nothing published, still applies. The PluralPort import reaches this through the native path.system_show_name). Hiding stays instant and ungated.Client notes: web is already on the settings PATCH. Android declares the old tier endpoint but does not call it. iOS calls it from the delete-confirmation picker and updates optimistically with the selected level, so with a grace window set the picker will show a tier the server has not applied yet; the deferral is visible on the iOS System Safety screen meanwhile. The move to the settings PATCH is written up in the design docs.
Verification