Skip to content

Commit

Permalink
Improve IP check [notarize]
Browse files Browse the repository at this point in the history
  • Loading branch information
tkleinke committed Sep 18, 2023
1 parent fc3786a commit 14309fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class DownloadProjectComponent {
const url: string = this.url?.trim();

// Prevent trying to download project from own database
return url.includes(address.ip())
return url.replace('http://', '').replace(':3000', '') === address.ip()
? '.'
: url;
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/app/services/settings/sync-target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export module SyncTarget {
if (!syncTarget) return undefined;

// Prevent trying to synchronize with own database
return syncTarget.address.includes(address.ip())
return syncTarget.address.trim().replace('http://', '').replace(':3000', '') === address.ip()
? '.'
: syncTarget.address;
}
Expand Down

0 comments on commit 14309fe

Please sign in to comment.