File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,14 @@ func ValidateURI(uri string) error {
25
25
}
26
26
// Maximum length check
27
27
if len (uri ) > 2048 {
28
- return fmt .Errorf ("URI exceeds maximum length of 2048 characters" )
28
+ return fmt .Errorf ("URI exceeds maximum length of 2048 characters: %v" , uri )
29
29
}
30
- // Add more validation as needed
31
30
// Validate URI format
32
31
if strings .Contains (uri , ".." ) {
33
- return fmt .Errorf ("URI cannot contain path traversal sequences" )
32
+ return fmt .Errorf ("URI cannot contain path traversal sequences: %v" , uri )
34
33
}
35
34
if strings .Contains (uri , " " ) {
36
- return fmt .Errorf ("URI cannot contain spaces" )
37
- }
38
- // Validate characters
39
- if strings .ContainsAny (uri , "<>|&;$" ) {
40
- return fmt .Errorf ("URI contains invalid characters" )
35
+ return fmt .Errorf ("URI cannot contain spaces: %v" , uri )
41
36
}
42
37
// Validate scheme-specific format
43
38
if strings .HasPrefix (uri , "oci://" ) {
You can’t perform that action at this time.
0 commit comments