twofactorauth
twofactorauth copied to clipboard
Support '?q=foobar' for automatic searches
Closes #6680
https://2fa.directory/?q=foobar bypasses the redirection script and sends the user to the root (non-int) page. Is this the intended result?
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.
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.
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.