Compare commits

...

1 Commits

Author SHA1 Message Date
Alexander Chan 63368557bc debug logs 2023-02-16 12:29:09 -08:00
1 changed files with 8 additions and 1 deletions

View File

@ -274,6 +274,12 @@ function checkBucketPolicy(policy, requestType, canonicalID, arn, bucketOwner, l
const actionMatch = _checkBucketPolicyActions(requestType, s.Action, log);
const resourceMatch = _checkBucketPolicyResources(request, s.Resource, log);
console.log('------------------', s);
console.log(principalMatch, s.Principal, arn, canonicalID);
console.log(actionMatch, s.Action, requestType);
console.log(resourceMatch, s.Resource, request);
if (principalMatch && actionMatch && resourceMatch && s.Effect === 'Deny') {
// explicit deny trumps any allows, so return immediately
return 'explicitDeny';
@ -368,7 +374,8 @@ function _checkResource(resource, bucketArn) {
}
if (resource.includes('/')) {
const rSubs = resource.split('/');
return rSubs[0] === bucketArn;
const result = rSubs[0] === bucketArn;
return result
}
return false;
}