Skip to content
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

define('XOOPS_COOKIE_DOMAIN', 'togodo.jubile.fr'); #1232

Open
JJDai54 opened this issue Jun 9, 2022 · 2 comments
Open

define('XOOPS_COOKIE_DOMAIN', 'togodo.jubile.fr'); #1232

JJDai54 opened this issue Jun 9, 2022 · 2 comments

Comments

@JJDai54
Copy link

JJDai54 commented Jun 9, 2022

Bonjour,
Lors de l'installation si on modifie la valeur de "Domaine des cookies pour le site" sur la 3eme page, et que l'on ajoute le sous-domaine, il devient impossible de se connecter à la fin de l'installation.
Cette valeur est défini dans la fichier "mainfile.php".

exemple avec ajout du sous-domaine :
// XOOPS Cookie Domain to specify when creating cookies. May be blank (i.e. for IP address host),
// full host from XOOPS_URL (i.e. www.example.com) or just the registered domain (i.e. example.com)
// to share cookies across multiple subdomains (i.e. www.example.com and blog.example.com)
define('XOOPS_COOKIE_DOMAIN', 'togodo.jubile.fr');

si je modifie et enlève le sous domaine, exemple
// XOOPS Cookie Domain to specify when creating cookies. May be blank (i.e. for IP address host),
// full host from XOOPS_URL (i.e. www.example.com) or just the registered domain (i.e. example.com)
// to share cookies across multiple subdomains (i.e. www.example.com and blog.example.com)
define('XOOPS_COOKIE_DOMAIN', 'jubile.fr');

Tout rentre dans l'ordre

A priori cela a des impact important entre les sous-domaines,

  • Impossibles de maintenir une connexion pertinente et ceci pour tous les utilisateurs.
  • Dans le module "profile", impossible de modifier sa fiche d'utilisateur, il m'indique que l'adresse est déjà existante.

Traduction Gogol :
Hello,
Hello,
During installation, if you modify the value of "Domain of cookies for the site" on the 3rd page, and add the subdomain, it becomes impossible to connect at the end of the installation.
This value is defined in the "mainfile.php" file.

example with addition of the subdomain:
// XOOPS Cookie Domain to specify when creating cookies. May be blank (i.e. for IP address host),
// full host from XOOPS_URL (i.e. www.example.com) or just the registered domain (i.e. example.com)
// to share cookies across multiple subdomains (i.e. www.example.com and blog.example.com)
define('XOOPS_COOKIE_DOMAIN', 'togodo.jubile.fr');

if I modify and remove the subdomain, example
// XOOPS Cookie Domain to specify when creating cookies. May be blank (i.e. for IP address host),
// full host from XOOPS_URL (i.e. www.example.com) or just the registered domain (i.e. example.com)
// to share cookies across multiple subdomains (i.e. www.example.com and blog.example.com)
define('XOOPS_COOKIE_DOMAIN', 'jubile.fr');

Everything is in order

A priori this has significant impact between the sub-domains,

  • Impossible to maintain a relevant connection and this for all users.
  • In the "profile" module, impossible to modify his user file, he tells me that the address already exists.
@JJDai54 JJDai54 changed the title define('XOOPS_COOKIE_DOMAIN', 'togoso.jubile.fr'); define('XOOPS_COOKIE_DOMAIN', 'togodo.jubile.fr'); Jun 9, 2022
@mambax7
Copy link
Collaborator

mambax7 commented Jun 12, 2022

I'm not sure that I understand it. I have several websites installed in subdomains and never had any issues with it.

On the main site 'www.example.com" the value in the mainfile.php is

define('XOOPS_COOKIE_DOMAIN', 'example.com');

On the subdomain site "demo.example.com" the value in the mainfile.php is

define('XOOPS_COOKIE_DOMAIN', 'demo.example.com');

What profile link do you use to modify user file? Can you provide more details about the errors you're getting?

@montuy337513
Copy link
Contributor

Hi mamba,
I noticed this phenomenon 3 times, during 3 fresh installations.
On Xoops 2.5.10, Xoops 2.5.11beta1 and the latest version (with PM, Profile and Protector).

In the third step of the installation, you fill in the form to indicate the domain to be used for cookies.
If, at this stage, you indicate a sub-domain (Ex: fr.xoops.org). It will be impossible for you to connect or if you succeed, you will get disconnected very quickly, especially when you are in the back.

I managed, each time, to solve the problem by using a domain or instead of a subdomain and by setting it in mainfile.php and the general preferences.
I didn't look any further.

On the other hand, it is useful to be able to differentiate the cookies of the main domain and the subdomains. If we don't have the same rights on the sites (Ex: admin on one and just visitor on the other), that will be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants