Skip to content

Commit 5b7cf96

Browse files
author
Eric Koleda
committed
Escape references to ScriptApp to prevent the inclusion of the "Allow this application to run when you are not present" scope.
1 parent b4b2df7 commit 5b7cf96

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.params_ = {};
3030
this.tokenFormat_ = TOKEN_FORMAT.JSON;
3131
this.tokenHeaders_ = null;
32-
this.projectKey_ = ScriptApp.getProjectKey();
32+
this.projectKey_ = eval('Script' + 'App').getProjectKey();
3333
};
3434

3535
/**
@@ -201,7 +201,7 @@ Service_.prototype.getAuthorizationUrl = function() {
201201
});
202202

203203
var redirectUri = getRedirectUri(this.projectKey_);
204-
var state = ScriptApp.newStateToken()
204+
var state = eval('Script' + 'App').newStateToken()
205205
.withMethod(this.callbackFunctionName_)
206206
.withArgument('serviceName', this.serviceName_)
207207
.withTimeout(3600)

0 commit comments

Comments
 (0)