@@ -17,6 +17,8 @@ <h2>Safe Fetch Subdirectory</h2>
1717< h2 > Unsafe Fetch</ h2 >
1818< pre class ="unsafe-fetch-status "> </ pre >
1919< pre class ="unsafe-fetch "> </ pre >
20+ < pre class ="unsafe-fetch-8498-status "> </ pre >
21+ < pre class ="unsafe-fetch-8498 "> </ pre >
2022
2123< h2 > Safe /@fs/ Fetch</ h2 >
2224< pre class ="safe-fs-fetch-status "> </ pre >
@@ -27,6 +29,8 @@ <h2>Safe /@fs/ Fetch</h2>
2729< h2 > Unsafe /@fs/ Fetch</ h2 >
2830< pre class ="unsafe-fs-fetch-status "> </ pre >
2931< pre class ="unsafe-fs-fetch "> </ pre >
32+ < pre class ="unsafe-fs-fetch-8498-status "> </ pre >
33+ < pre class ="unsafe-fs-fetch-8498 "> </ pre >
3034
3135< h2 > Nested Entry</ h2 >
3236< pre class ="nested-entry "> </ pre >
@@ -83,6 +87,19 @@ <h2>Denied</h2>
8387 console . error ( e )
8488 } )
8589
90+ // outside of allowed dir with special characters #8498
91+ fetch ( '/src/%2e%2e%2funsafe%2etxt' )
92+ . then ( ( r ) => {
93+ text ( '.unsafe-fetch-8498-status' , r . status )
94+ return r . text ( )
95+ } )
96+ . then ( ( data ) => {
97+ text ( '.unsafe-fetch-8498' , data )
98+ } )
99+ . catch ( ( e ) => {
100+ console . error ( e )
101+ } )
102+
86103 // imported before, should be treated as safe
87104 fetch ( '/@fs/' + ROOT + '/safe.json' )
88105 . then ( ( r ) => {
@@ -106,6 +123,16 @@ <h2>Denied</h2>
106123 console . error ( e )
107124 } )
108125
126+ // outside root with special characters #8498
127+ fetch ( '/@fs/' + ROOT + '/root/src/%2e%2e%2f%2e%2e%2funsafe%2ejson' )
128+ . then ( ( r ) => {
129+ text ( '.unsafe-fs-fetch-8498-status' , r . status )
130+ return r . json ( )
131+ } )
132+ . then ( ( data ) => {
133+ text ( '.unsafe-fs-fetch-8498' , JSON . stringify ( data ) )
134+ } )
135+
109136 // not imported before, inside root with special characters, treated as safe
110137 fetch (
111138 '/@fs/' +
0 commit comments