SECURITY: Fix accidental public CC headers in img_auth.php
[lhc/web/wiklou.git] / img_auth.php
index f23de4f..44ef0a1 100644 (file)
@@ -97,8 +97,10 @@ function wfImageAuthMain() {
                        }
                        if ( $be->fileExists( [ 'src' => $filename ] ) ) {
                                wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." );
-                               $be->streamFile( [ 'src' => $filename ],
-                                       [ 'Cache-Control: private', 'Vary: Cookie' ] );
+                               $be->streamFile( [
+                                       'src' => $filename,
+                                       'headers' => [ 'Cache-Control: private', 'Vary: Cookie' ]
+                               ] );
                        } else {
                                wfForbidden( 'img-auth-accessdenied', 'img-auth-nofile', $path );
                        }