Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
277 views
in Q2A Core by
When a logged out user searches and gets search results and tries to login or register from the search results page they get a 403 error.

For example if a user visits https://example.com a Q2A site then searches for the term, "equations".

The user then tries to login from that results page and they will be redirected to https://example.com/login?to=search%3Fq%3Dequations which gives a 403 error

Is this a bug or are there some permissions I should enable?

Thanks.
Q2A version: 1.8.8
by
Still getting the 403 error even with the fix. Currently affects me when trying to log in while visiting the most viewed, voted, answered, etc. questions page filters. Also when viewing the no selected answer and no upvoted answer filters. Not just with search results.
by
my server uses php 8.4, but I could downgrade it to 8.2 and get the same error. Maybe this is a script-wide issue?
by
do you replace with in htacces : RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [BCTLS,L,UnsafeAllow3F]

3 Answers

+1 vote
by
Same with me!
+1 vote
by
Yes, it's a Error. It would be nice if someone could fix this issue.
+1 vote
by
edited by

We fixed this problem some how but i dont know this is safe or not, but this is working

Reference: https://github.com/friendica/friendica/issues/14303

in q2a .htaccess file change this line:

FROM:

RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [BCTLS,L]

TO:

RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [BCTLS,L,PT,UnsafeAllow3F]

OR:

RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [BCTLS,L,UnsafeAllow3F]

Please tell me this is safe or not, if anyone knows.

...