Skip to main content

Redirect to login form broken

As I understand it, when a public (logged-out) user lands on my community page (https://enviropronj.com/pro), they should be redirected to the URL in Portal Settings > General > Redirect URL. I'm using the default login URL there.

However, when I log out and go to the community page, the redirect is wonky and the page doesn't exist: https://enviropronj.com/pro/?fcom_action=auth&redirect_to=https://enviropronj.com/pro.

Raiyan Marzan

Charles MetzgerΒ Could you please create a support ticket?

Thank you for reporting. The issue is Cloudflare's WAF blocking the request when a full URL is in the redirect_to query parameter β€” it sees redirect_to=https://enviropronj.com/pro as a potential open redirect attack.

I have fixed the issue in my dev environment with changing redirect_to from full URL (https://enviropronj.com/pro) to relative path (/pro). Will create a pull request for the work.

Charles Metzger

Tawsif Ahmed RiyadΒ Oh interesting. Is there something I can change in my CF setup? Can you send me a patch I can apply until the next update?

Charles Metzger, I am outside, kindly give me some time, I’ll share.

Charles Metzger

Tawsif Ahmed RiyadΒ Of course, thank you!

Charles Metzger, check the link below, just replace the renderFullApp() method of plugins/fluent-community/app/Hooks/Handlers/PortalHandler.php file. Give a feedback after you've done the work.

https://gist.github.com/tawsifahmed/6ac1f0bce8681887c53e145f9610ba8e

Charles Metzger

Tawsif Ahmed RiyadΒ That works great thanks so much! Will this make it into the next update, or should I bookmark this just in case?

Charles Metzger, will be added.