-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flatpress 1.3 Login not working with http protocol #371
Comments
Hello @prbt2016 I have invested a lot of time in testing, but I am not aware of such a problem. Mostly such problems occur in connection with Docker or reverse proxies. There may be a misconfiguration. FlatPress has no influence on the configurations of Docker, reverse proxies and DNS resolvers. You can rename existing .htaccess files as a test - just in case a failed rewrite rule is hidden here. Check the
Best regards |
Hello @Fraenkiman ,
We'll I am not using Docker, reverse proxies and DNS resolvers, plus i have no .htaccess configured. Using 'LAMP' stack for testing . My settings.conf.php holds this content as below for the www URL i.e:
I have the browser console output of the same for your kind reference . Please check . Kindly let me know regarding the same. Regards. |
Hello @prbt2016. You can weaken the cookie at your own risk by removing the "samesite" attribute and the corresponding value. In line 132 you would have to change the value from 1 to 0. But let's ask the other way round: Would you want to log in somewhere even though you are connected via an HTTP connection/unencrypted? A non-encrypted connection does not provide a secure login. With best regards |
I have created #375 and am therefore closing this issue. |
@prbt2016 Update 2024-04-15: |
Hello everyone, We don't know the server setup of the FlatPress admin.
Alternatively, I could place a warning in the support plugin that it is not recommended to offer HTTP during live operation. With best regards from Berlin |
Hello @azett , @Fraenkiman , Thanks for looking into the issue. I checked with the package i.e https://github.com/flatpressblog/flatpress/archive/refs/heads/issue371_httphttps.zip But still having the same issue with http. I have tested with latest browser versions i.e : Chrome Version 123.0.6312.122 (Official Build) (64-bit) and Firefox 124.0.2 (64-bit). Following is the console output for your kind reference : Is there anything else that I can debug ?. Kindly let me know?. Regards. |
Hello everyone, That's strange! With a non-HTTPS call, the red part I marked should not work at all. ... but only the part marked green by me. This means that the "SameSite" and "secure" attributes should not be set at all. Apparently the evaluation of the query in line 133 does not work correctly and Line 133 in ddfef97
If this is the case, the following change in line 133 should remedy the situation
Debugging: For me, with a non-HTTPS connection:
results in
@prbt2016, would you like to make the change yourself and test it?
I have no possibility to test with reverse proxy, load balancer or under IIS. @DeltaLima, please check this as well if possible. With best regards |
I was finally able to reproduce this one on a HTTP-only server with "HTTPS only" deactivated in Firefox. For the record: Same problem as in #378 |
@azett, your ba890f3 fix works with my test options. Update 23.04.2024: |
Hello @Fraenkiman , @azett Apologies for the delay in reply. I have checked with the latest dev branch i.e https://github.com/flatpressblog/flatpress/archive/refs/heads/issue371_httphttps.zip and script works fine both on http and https. Regards. |
Hello @prbt2016, I'm glad to read that the admin login now works with HTTP and HTTPS. Thank you for the time and effort you have invested. We have another problem which is similar. I have implemented @rrossouw01's solution in another branch. With best regards
|
Hello @Fraenkiman , Unfortunately I don't have any load balancer setup available . So won't be able to check the exact test case. But I tested with this https://github.com/Fraenkiman/flatpress/archive/refs/heads/issue251-hhtps-LB-Proxy.zip on both http and https environments Didn't face any issues as such with themes. Regards. |
Hello @prbt2016, it's not so tragic that you don't have an environment with a load balancer. @rrossouw01 has already tested this solution with LB environment. I just want to make sure that with the issue251-hhtps-LB-Proxy.zip branch you don't have the login problem with Http connection again. We may then be able to solve two different problems with this branch. Thanks again for your support. |
Thank you all for testing and fixing! I put it all together in the issue371_httphttps branch. |
guys -- it did not work for me. I am using a fresh download issue371_httphttps.zip. couple things:
if the diff is unclear all I did was add one line in defaults.php:
|
@azett, Line 192 in 16298a3
maybe @rrossouw01, can you please change the line 192 I highlighted to Many thanks in advance. |
My bad :( |
@azett that works. I did not have time to revisit the setup issue I mentioned but simply replacing with your fix works for lb(traefik with cert) + container(flatpress served on http).
|
Awesome, thank you very much for testing patiently. |
Hello everyone, many, many thanks for your support. Have a nice Sunday evening |
It's not work for me. I have modified these 2 files (ba890f3) |
Hi @RoopeshKharvi, thanks for testing.
ba890f3 still had an error. Curious questions: What did your modification look like? With reverse proxy or load balancer? With best regards |
both works in docker (ab1a9df and https://github.com/flatpressblog/flatpress/archive/refs/heads/master.zip) |
Hello @azett , @Fraenkiman I have tested with the master branch and it worked fine for me on both http and https without any hassles. Kind regards. |
@RoopeshKharvi Thanks for testing! Can you provide relevant portions of your web server's or PHP's error log? Or any other output or log file that may contain more details?
@prbt2016 Awesome, thanks a lot! :) |
Hello,
I was in the process of manual installation of Flatpress 1.3 with Centos 7 with Apache 2.2/ 2.4, and also PHP 7.1/7.2/7.3/7.4/8.0/8.1/8.2/8.3 on http protocol on multiple testing servers.
However , I found that login doesn't work with http protocol, after entering the credentials , script redirects back to login .
However on https the login works fine .
Is this an issue ? . Could you please replicate that on your server ?
The text was updated successfully, but these errors were encountered: