Skip to content

Commit

Permalink
Ensure safety of coordinate regex
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-va committed Dec 3, 2024
1 parent c80d093 commit 8ac0f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/components/search/search-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class SearchInput extends LitElementI18n {
}

private searchAdditionalItemsByCoordinates(query: string): AdditionalItem[] {
const COORDINATE_PATTERN = /([\d.']+)[\s,/]+([\d.']+)/;
const COORDINATE_PATTERN = /(\d[\d.']*)[\s,/]+(\d[\d.']*)/;
const coordinateMatches = COORDINATE_PATTERN.exec(query);
if (coordinateMatches === null) {
return [];
Expand Down

0 comments on commit 8ac0f79

Please sign in to comment.