File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -123,21 +123,23 @@ async fn post_encrypted(_req: Request, ctx: RouteContext<()>) -> Result<Response
123123 Response :: redirect ( redirect_url)
124124}
125125
126- static DELETE_WHITELIST : [ & str ; 7 ] = [
126+ static DELETE_WHITELIST : [ & str ; 9 ] = [
127127 "/" ,
128128 "term.js" ,
129129 "term.css" ,
130130 "term.html" ,
131131 "jquery.js" ,
132132 "highlight.html" ,
133133 "search.html" ,
134+ "prism.js" ,
135+ "prism.css" ,
134136] ;
135137
136138async fn delete ( _req : Request , ctx : RouteContext < ( ) > ) -> Result < Response > {
137139 let empty_string = String :: new ( ) ;
138140 let file = ctx. param ( "file" ) . unwrap_or_else ( || & empty_string) . as_str ( ) ;
139141 if DELETE_WHITELIST . contains ( & file) {
140- return Response :: ok ( "this file is protected" ) ;
142+ return Response :: error ( "this file is protected" , 403 ) ;
141143 }
142144 let _result = ctx
143145 . kv ( "pastebin" )
You can’t perform that action at this time.
0 commit comments