File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 2424 top : 5px ;
2525 right : 5px ;
2626 height : 50px ;
27- width : 110px ;
2827 }
2928}
3029
Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ export const handleUpdateInformation = async () => {
5353 button . disabled = false ;
5454 } catch ( errorMessage ) {
5555 if ( errorMessage instanceof SyntaxError ) {
56- errorMessage = 'The requested resource was not found on the server. Please check your server configuration.' ;
56+ errorMessage =
57+ 'The requested resource was not found on the server. ' +
58+ 'Please check your server configuration, especially the RewriteBase in your .htaccess configuration.' ;
5759 } else {
5860 errorMessage = errorMessage . message ;
5961 }
@@ -142,10 +144,13 @@ export const handleDatabaseUpdate = async () => {
142144
143145 await pump ( ) ;
144146 }
147+
145148 await pump ( ) ;
146149 } catch ( error ) {
147150 const errorMessage =
148- error . cause && error . cause . response ? await error . cause . response . json ( ) : { error : 'Unknown error' } ;
151+ error . cause && error . cause . response
152+ ? await error . cause . response . json ( )
153+ : { error : 'Unknown database error during update.' } ;
149154 const alert = document . getElementById ( 'phpmyfaq-update-database-error' ) ;
150155
151156 alert . classList . remove ( 'd-none' ) ;
Original file line number Diff line number Diff line change 681681 'last_modified ' => new DateTime ()
682682]);
683683
684+ //
685+ // Avoid automatic downloads
686+ // and prevent browsers from interpreting files as a different MIME type than what is specified
687+ //
688+ if ($ action !== 'attachment ' ) {
689+ $ response ->headers ->set ('Content-Disposition ' , 'inline ' );
690+ }
691+ $ response ->headers ->set ('X-Content-Type-Options ' , 'nosniff ' );
692+
684693$ response ->send ();
Original file line number Diff line number Diff line change @@ -640,7 +640,9 @@ public function checkBasicStuff(): void
640640 }
641641
642642 if (!$ this ->system ->checkInstallation ()) {
643- throw new Exception ('phpMyFAQ is already installed! Please use the <a href="../update">update</a>. ' );
643+ throw new Exception (
644+ 'Looks like phpMyFAQ is already installed! Please use the <a href="../update">update</a>. '
645+ );
644646 }
645647 }
646648
You can’t perform that action at this time.
0 commit comments