Skip to content

Commit

Permalink
require alphabetic prefix on URI
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <[email protected]>
  • Loading branch information
andrewwhitehead committed Jan 24, 2024
1 parent 8ad2112 commit 59e8699
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use regex::Regex;
// Right now everything after the first colon is allowed,
// we might want to restrict this
pub static URI_IDENTIFIER: Lazy<Regex> =
Lazy::new(|| Regex::new(r"^[a-zA-Z0-9\+\-\.]+:.+$").unwrap());
Lazy::new(|| Regex::new(r"^[a-zA-Z][a-zA-Z0-9\+\-\.]*:.+$").unwrap());

/// base58 alpahet as defined in the [base58
/// specification](https://datatracker.ietf.org/doc/html/draft-msporny-base58#section-2) This is
Expand Down

0 comments on commit 59e8699

Please sign in to comment.