equal
deleted
inserted
replaced
1331 end |
1331 end |
1332 end |
1332 end |
1333 |
1333 |
1334 local function redirect_uri_allowed(redirect_uri, client_uri, app_type) |
1334 local function redirect_uri_allowed(redirect_uri, client_uri, app_type) |
1335 local uri = url.parse(redirect_uri); |
1335 local uri = url.parse(redirect_uri); |
|
1336 if not uri then |
|
1337 return false; |
|
1338 end |
1336 if not uri.scheme then |
1339 if not uri.scheme then |
1337 return false; -- no relative URLs |
1340 return false; -- no relative URLs |
1338 end |
1341 end |
1339 if app_type == "native" then |
1342 if app_type == "native" then |
1340 return uri.scheme == "http" and loopbacks:contains(uri.host) or redirect_uri == oob_uri or uri.scheme:find(".", 1, true) ~= nil; |
1343 return uri.scheme == "http" and loopbacks:contains(uri.host) or redirect_uri == oob_uri or uri.scheme:find(".", 1, true) ~= nil; |