`script scripts run` percent-encodes unreserved characters in scriptId path parameter, causing 404
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
Research direction
Start with the gws script scripts run command and reproduce the issue using the supplied --dry-run example. Compare its URL construction with gws script projects get; done means unreserved - and _ remain literal in the scriptId path and the resulting URL matches the expected form.
Written by the indexing model from the issue text.
Description
When calling gws script scripts run, the scriptId passed via --params is percent-encoded in the URL path, turning - into %2D and _ into %5F. These are unreserved characters per RFC 3986 and should not be encoded. The resulting URL is rejected by the Apps Script Execution API with 404.
Steps to reproduce
gws script scripts run \
--params '{"scriptId":"1-ukYIb8XjT9KQlsj6_NbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO-P"}' \
--json '{"function":"myFunction","devMode":true}' \
--dry-run
Expected URL
https://script.googleapis.com/v1/scripts/1-ukYIb8XjT9KQlsj6_NbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO-P:run
Actual URL
https://script.googleapis.com/v1/scripts/1%2DukYIb8XjT9KQlsj6%5FNbryM5UJXBwAMeY5GKtSBA05csXty3iY7DhO%2DP:run
Result: API returns 404 Requested entity was not found, even though the same scriptId works correctly with gws script projects get.
Note: gws script projects get --params '{"scriptId":"..."}' works fine — the path encoding issue appears to be specific to the scripts run endpoint.
Version
gws 0.22.5
- Dominant language
- Rust
- Stars
- 32.3k
- Forks
- 2k
- Avg merge
- 16h 3m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleworkspace/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
googleworkspace/cli#984 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
googleworkspace/cli#983 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
googleworkspace/cli#958 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleworkspace/cli#921 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
googleworkspace/cli#920 ·
Maintainers usually reply within 1 day
All issues in googleworkspace/cli
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
status: new topic: ga4gh-sdk type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
comp-rbac
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ClickHouse/ClickHouse#131875 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPossibly taken @Borg93 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
lance-format/lance#11117 ·
Maintainers usually reply within 2 days