Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
check urlStr.substring(remainingLength) !== suffix, fix inrupt/pod-se…
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Sep 8, 2019
1 parent 8c37046 commit d9b066d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/authorization/checkAccess.ts
Expand Up @@ -53,7 +53,7 @@ function removeUrlSuffix (url: URL, suffix: string): URL {
if (remainingLength < 0) {
throw new Error('no suffix match (URL shorter than suffix)')
}
if (urlStr[urlStr.length - 1].substring(remainingLength) !== suffix) {
if (urlStr.substring(remainingLength) !== suffix) {
throw new Error('no suffix match')
}
return new URL(urlStr.substring(0, remainingLength))
Expand Down

0 comments on commit d9b066d

Please sign in to comment.