File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/__tests__/unit/checks Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -404,8 +404,8 @@ describe('urls guardrail', () => {
404404 expect ( result . info ?. blocked ) . toEqual ( [ ] ) ;
405405 } ) ;
406406
407- it ( 'blocks non-default ports when allow list has no port' , async ( ) => {
408- // URLs with non-default ports should be blocked when allow list doesn't specify a port
407+ it ( 'allows any port when allow list entry has no port specification ' , async ( ) => {
408+ // When the allow list entry omits a port, URLs with any port (default or non-default) are allowed
409409 const config = {
410410 url_allow_list : [ 'example.com' ] ,
411411 allowed_schemes : new Set ( [ 'https' ] ) ,
@@ -417,7 +417,6 @@ describe('urls guardrail', () => {
417417 const result = await urls ( { } , text , config ) ;
418418
419419 // Both should be allowed - when allow list has no port, any port is OK
420- // (This matches the behavior: no port restriction when not specified)
421420 expect ( result . tripwireTriggered ) . toBe ( false ) ;
422421 expect ( result . info ?. allowed ) . toContain ( 'https://example.com:8443' ) ;
423422 expect ( result . info ?. allowed ) . toContain ( 'https://example.com:9000' ) ;
You can’t perform that action at this time.
0 commit comments