Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

fix: prevent samples from leaking OAuth client ID + Secret to users #54

Merged
merged 2 commits into from
Jul 27, 2022
Merged

fix: prevent samples from leaking OAuth client ID + Secret to users #54

merged 2 commits into from
Jul 27, 2022

Conversation

AlnisS
Copy link
Contributor

@AlnisS AlnisS commented Jul 5, 2022

This mirrors the same PR in the OAuth2 library: googleworkspace/apps-script-oauth2#379

Previously, the getService method was public in most of the samples, letting any user of any sample application execute the method using google.script.run to exfiltrate the OAuth Client ID and Secret from the server.
Now, these methods are made private by appending an _ to their names, preventing this issue.
See also similar issue in the OAuth2 library: googleworkspace/apps-script-oauth2#378

closes #53

Previously, the getService method was public in most of the samples, letting any user of any sample application execute the method using google.script.run to exfiltrate the OAuth Client ID and Secret from the server.
Now, these methods are made private by appending an _ to their names, preventing this issue.
See also similar issue in the OAuth2 library: googleworkspace/apps-script-oauth2#378
@AlnisS
Copy link
Contributor Author

AlnisS commented Jul 5, 2022

Issue: #53

@jpoehnelt jpoehnelt assigned jpoehnelt and unassigned davidharcombe Jul 27, 2022
@jpoehnelt jpoehnelt merged commit 0673b8a into googleworkspace:master Jul 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Security: OAuth Client ID and Secret are accessible to any user of an Apps Script in almost all samples
3 participants