File tree Expand file tree Collapse file tree 4 files changed +18
-13
lines changed
Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 306306 <form action =" {{ exportUserDataUrl }}" method =" post" >
307307 {{ csrfExportUserData | raw }}
308308 <input type =" hidden" name =" userid" value =" {{ userid }}" />
309- <button type =" submit" class =" btn btn-success" >
310- <i aria-hidden =" true" class =" bi bi-download" ></i > {{ msgDownload }}
311- </button >
309+
310+ <div class =" row" >
311+ <div class =" col-12 text-end" >
312+ <button type =" submit" class =" btn btn-primary" >
313+ <i aria-hidden =" true" class =" bi bi-download" ></i > {{ msgDownload }}
314+ </button >
315+ </div >
316+ </div >
312317 </form >
313318 </div >
314319 </div >
Original file line number Diff line number Diff line change 138138$ error = null ;
139139$ loginVisibility = 'hidden ' ;
140140
141- $ faqusername = Filter::filterVar ($ request ->attributes ->get ('faqusername ' ), FILTER_SANITIZE_SPECIAL_CHARS );
141+ $ faqusername = Filter::filterVar ($ request ->request ->get ('faqusername ' ), FILTER_SANITIZE_SPECIAL_CHARS );
142142$ faqpassword = Filter::filterVar (
143- $ request ->attributes ->get ('faqpassword ' ),
143+ $ request ->request ->get ('faqpassword ' ),
144144 FILTER_SANITIZE_SPECIAL_CHARS ,
145145 FILTER_FLAG_NO_ENCODE_QUOTES ,
146146);
147- $ faqaction = Filter::filterVar ($ request ->attributes ->get ('faqloginaction ' ), FILTER_SANITIZE_SPECIAL_CHARS );
148- $ rememberMe = Filter::filterVar ($ request ->attributes ->get ('faqrememberme ' ), FILTER_VALIDATE_BOOLEAN );
149- $ token = Filter::filterVar ($ request ->attributes ->get ('token ' ), FILTER_SANITIZE_SPECIAL_CHARS );
150- $ userId = Filter::filterVar ($ request ->attributes ->get ('userid ' ), FILTER_VALIDATE_INT );
147+ $ faqaction = Filter::filterVar ($ request ->request ->get ('faqloginaction ' ), FILTER_SANITIZE_SPECIAL_CHARS );
148+ $ rememberMe = Filter::filterVar ($ request ->request ->get ('faqrememberme ' ), FILTER_VALIDATE_BOOLEAN );
149+ $ token = Filter::filterVar ($ request ->request ->get ('token ' ), FILTER_SANITIZE_SPECIAL_CHARS );
150+ $ userId = ( int ) Filter::filterVar ($ request ->request ->get ('userid ' ), FILTER_VALIDATE_INT );
151151
152152//
153153// Set username via SSO
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function updateData(Request $request): JsonResponse
6060 $ password = trim ((string ) Filter::filterVar ($ data ->faqpassword , FILTER_SANITIZE_SPECIAL_CHARS ));
6161 $ confirm = trim ((string ) Filter::filterVar ($ data ->faqpassword_confirm , FILTER_SANITIZE_SPECIAL_CHARS ));
6262 $ twoFactorEnabled = Filter::filterVar ($ data ->twofactor_enabled ?? 'off ' , FILTER_SANITIZE_SPECIAL_CHARS );
63- $ secret = Filter::filterVar ($ data ->secret , FILTER_SANITIZE_SPECIAL_CHARS );
63+ $ secret = Filter::filterVar ($ data ->secret ?? '' , FILTER_SANITIZE_SPECIAL_CHARS );
6464
6565 $ isAzureAdUser = $ this ->currentUser ->getUserAuthSource () === 'azure ' ;
6666 $ isWebAuthnUser = $ this ->currentUser ->getUserAuthSource () === 'webauthn ' ;
Original file line number Diff line number Diff line change 11<?php
22
3- declare (strict_types=1 );
4-
53/**
64 * Helper class for phpMyFAQ search.
75 *
1715 * @since 2009-09-07
1816 */
1917
18+ declare (strict_types=1 );
19+
2020namespace phpMyFAQ \Helper ;
2121
2222use Exception ;
@@ -92,7 +92,7 @@ public function createAutoCompleteResult(SearchResultSet $searchResultSet): arra
9292 $ link = new Link ($ currentUrl , $ this ->configuration );
9393 $ link ->setTitle ($ result ->question );
9494 $ faq = new stdClass ();
95- $ faq ->category = $ this ->Category ->getPath ($ result ->category_id ?? 0 );
95+ $ faq ->category = $ this ->Category ->getPath (( int ) $ result ->category_id ?? 0 );
9696 $ faq ->question = Utils::chopString ($ question , 15 );
9797 $ faq ->url = $ link ->toString ();
9898
You can’t perform that action at this time.
0 commit comments