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

Commit 8dd11d9

Browse files
author
ekoleda
committed
Escape references to ScriptApp to prevent the inclusion of the "Allow this application to run when you are not present" scope.
1 parent 38e3c78 commit 8dd11d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Service.gs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var Service_ = function(serviceName) {
2929
this.paramLocation_ = 'auth-header';
3030
this.method_ = 'get';
3131
this.oauthVersion_ = '1.0a';
32-
this.projectKey_ = ScriptApp.getProjectKey();
32+
this.projectKey_ = eval('Script' + 'App').getProjectKey();
3333
};
3434

3535
/**
@@ -492,7 +492,7 @@ Service_.prototype.getCallbackUrl_ = function() {
492492
'Service Name': this.serviceName_,
493493
'Project Key': this.projectKey_
494494
});
495-
var stateToken = ScriptApp.newStateToken()
495+
var stateToken = eval('Script' + 'App').newStateToken()
496496
.withMethod(this.callbackFunctionName_)
497497
.withArgument('serviceName', this.serviceName_)
498498
.withTimeout(3600)

0 commit comments

Comments
 (0)