Merge pull request #1404 from joserebelo/import-trailing-slash

Fix parse of import URI with trailing slash
This commit is contained in:
Sylvia van Os
2023-07-07 18:35:25 +02:00
committed by GitHub
2 changed files with 35 additions and 1 deletions

View File

@@ -46,8 +46,11 @@ public class ImportURIHelper {
}
private boolean isImportUri(Uri uri) {
// Remove trailing slash added by some browsers (if it exists)
final String uriPath = uri.getPath().replaceAll("/$", "");
for (int i = 0; i < hosts.length; i++) {
if (uri.getHost().equals(hosts[i]) && uri.getPath().equals(paths[i])) {
if (uri.getHost().equals(hosts[i]) && uriPath.equals(paths[i])) {
return true;
}
}