fix(tracking): validate app ids in the local tracking client - #946
Open
elijahbenizzy wants to merge 1 commit into
Open
elijahbenizzy wants to merge 1 commit into
elijahbenizzy wants to merge 1 commit into
Conversation
The local tracking client turned app ids (and the parent app ids used for fork/spawn links) straight into directory names under the storage directory. Apply the rule the project name already used -- letters, digits, '_', '-', ':' and '.', non-empty, not '.' or '..', at most 255 characters -- to every identifier that becomes a path, and check that joined paths stay inside the storage directory. The rule lives in burr.tracking.common.identifiers so the server side can share it. Errors surface as ValueError from ApplicationBuilder.build().
This branch has not been deployed
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.
LocalTrackingClientvalidated project names but notapp_id, even though both become directory names understorage_dir. This change applies one rule to both (letters, digits,_,-,.,:; non-empty; not./..; at most 255 chars) and adds a containment check on every path the client builds, so a malformed id fails atApplicationBuilder.build()rather than producing files in unexpected places.Side effects: project names may now contain
.; the project-name error message is shorter. The validation helper lives inburr/tracking/common/identifiers.pyso the tracking server can share it.