new membership is always invalid since the last update

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
chrisagon
Posts: 18
Joined: 2016-10-13 19:38
Location: Paris, France
Contact:

new membership is always invalid since the last update

Post by chrisagon » 2020-07-28 20:27

Hello,
Since the last update of Appgini, my appgini apps cannot accept new membership : the userid is always invalid.
But it is ok, it accepts new membership when it is on the localhost, but not on the webserver.
You can try all the userid you want :
https://brickodeurs.xyz/hexilis/membership_signup.php
https://brickodeurs.xyz/hrcv3/membership_signup.php

There are only 2 users in my membership_users table.

the script membership_signup.php is generated by AppGini and is encoded with utf8 !

My apps are generated with Appgini 5.84.

Serveur de base de données
Serveur : Localhost via UNIX socket
Type de serveur : MariaDB
Connexion au serveur : SSL n'est pas utilisé
Version du serveur : 10.1.44-MariaDB-0+deb9u1 - Debian 9.11
Jeu de caractères du serveur : UTF-8 Unicode (utf8mb4)
Serveur Web
Apache/2.4.25 (Debian)
Version du client de base de données : libmysql - mysqlnd 7.4.7
Extension PHP : mysqli curl mbstring
Version de PHP : 7.4.7

I don't understand why I have this bug ?
And nobody else ?
Chrisagon.

chrisagon
Posts: 18
Joined: 2016-10-13 19:38
Location: Paris, France
Contact:

Re: new membership is always invalid since the last update

Post by chrisagon » 2020-07-31 07:16

I answer to my self : it could help the community.
So it seems that I have some setting on the server that strips HTML comments from pages? The signup script sends a username check to checkMemberID.php, which replies with an ok, or error ...

For example, if you try to sign up with the username abcd, a request is sent to https://brickodeurs.xyz/hexilis/checkMe ... berID=abcd ... is you check that link, it mentions that the user abcd is available, so it works as expected. However, if you view the source code of that page (right click anywhere in the page > View page source), you should find an HTML comment in there <!-- AVAILABLE --> ... This is the code that the signup page is looking for to check if a username is available or not. Something is stripping this comment off the page and causing this issue.

I have searched what could stripped comments but the installation of my webserver is standard. There is nothing more except php-fpm. I have founded nothing in the php.ini.
So I have made a quick and dirty correction in the membership_signup.php file, I have modified the function checkUser()  to catch the word in the answer of checkMemberID.php "invalid" instead of <!-- AVAILABLE -->
It works but it is not "standard" and I will have to pay attention at the next update of my apps.
If you have an idea of what could stripped the comments in the generated html files, let me know.
Thank you for your help.
Chrisagon.

chrisagon
Posts: 18
Joined: 2016-10-13 19:38
Location: Paris, France
Contact:

Re: new membership is always invalid since the last update

Post by chrisagon » 2020-09-03 13:25

I answer to my self : it could help the community.
The trouble comes from CloudFlare : that optimizes HTML output.
So I have made an exception for checkMemberID.php and now the <!-- AVAILABLE --> is present in the file.
It works fine now.
Chrisagon.

Post Reply