twofactorauth icon indicating copy to clipboard operation
twofactorauth copied to clipboard

Support '?q=foobar' for automatic searches

Open phallobst opened this issue 3 years ago • 4 comments
trafficstars

Closes #6680

phallobst avatar May 15 '22 08:05 phallobst

https://2fa.directory/?q=foobar bypasses the redirection script and sends the user to the root (non-int) page. Is this the intended result?

Carlgo11 avatar May 16 '22 02:05 Carlgo11

I addressed this concern on the issue as well. One could either use https://2fa.directory/int/?q=foobar to make sure the result is displayed in any case, or leave the region out to force the search within the redirected region.

Maybe we could alter the text "No results found." to "No results found for this region." if applicable.

phallobst avatar May 16 '22 09:05 phallobst

I think the option of redirecting to a local region is fine and the option of redirecting to the int site is fine but I don't think the current option is a good alternative. The global non-int page is an undocumented page which very likely will be removed in the near future. If this search param is to be used I think the redirect script should be updated to catch these requests and handle them in one of the ways mentioned above.

Carlgo11 avatar May 17 '22 02:05 Carlgo11

As mentioned in 2factorauth/redirect#1 there aren't any practical solutions with the redirect script. A possible workaround could be redirecting the user with clientside Javascript always from the root to the /int/ page. So the feature would at least be usable.

sn00py1310 avatar Jun 29 '22 17:06 sn00py1310