fix: Escape package names in UsersService methods - #4545
Conversation
GetPackage escaped packageName but the other seven UsersService package methods interpolated it raw, so a name containing a slash produced a malformed path. Container and scoped npm package names routinely contain one. OrganizationsService already escapes it in all seven equivalent methods, so this brings the user methods in line and adds the same doc note. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4545 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 196 196
Lines 17938 17938
=======================================
Hits 17677 17677
Misses 261 261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@pucedoteth - for the CLA issue, chances are high that Anthropic will never sign the CLA and the following contributors were found for this pull request: ✅ f02b3f2 Author: @pucedoteth <119044801+pucedoteth@users.noreply.github.com> So I recommend that you CLOSE this PR and create a new PR where YOU are the only committer. |
UsersService.GetPackageescapespackageName, but the other seven package methods interpolate it raw, so a name containing a slash produces a malformed path. Container and scoped npm package names routinely contain one.OrganizationsServicealready escapes it in all seven equivalent methods and documents it, so this just brings the user methods in line: 12 call sites escaped, plus the same doc note.The existing tests missed this because only the
GetPackagetest uses a slashed name (hello/hello_docker); the rest usehello_docker. The new test uses a slashed name against every affected method — all ten sub-cases fail without the change and pass with it.AI assistance: Claude Code found the inconsistency, made the edits, and drafted the test and this description. I reviewed the diff and ran
script/fmt.sh,script/generate.sh(no drift),script/lint.shandscript/test.sh.