[EP-tech] set_lang on 3.4.3
David R Newman
drn at ecs.soton.ac.uk
Wed Jun 2 18:36:12 BST 2021
Hi Mario,
This code relates to setting the correct attributes for the cookie
EPrints uses to store the user's language preference. This change was
made to deal with the fact that FireFox was not going to continue to
support the cookei for this in its current form.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F118&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cbe4755c93feb40360e6708d925eceb57%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582521764257813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Rj1Rt3jcy1yeSK5c%2B5meVCmW7i3golvjh%2BmE%2FAC2hw8%3D&reserved=0
I am sure this worked when I tested but looking at it now I can see a
couple of problems with it. Maybe this was down to a merge that went
bad. Unfortunately, /cgi/set_lang was not part of my automated build
testing prior to release but I will be adding it when I next get a chance.
I have added a patch to the GitHub code that should fix the specific
issue you reported:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommit%2F8c18cd49c65597539bd3fe9c1c97ef05c52694f7&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cbe4755c93feb40360e6708d925eceb57%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582521764257813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FL8Kd2mSgS819rnz%2BLZiuq8CXmKXtoN9ezZduARfvcE%3D&reserved=0
However, to fix issue #118 you need to also make sure you have a recent
version (I am on 4.51) of the CGI::Cookie Perl package installed, (i.e.
most likely through installing using CPAN). Otherwise, this fix to
set_lang will likely not do anything useful (but should not make
anything worse), as what it is trying to do is probably not supported by
the version of CGI::Cookie you have installed.
Regards
David Newman
On 02/06/2021 17:18, Beaudoin, Mario via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
> Hello,
>
> I just upgrade my dev repository on 3.4.1 to 3.4.3, and since I
> cannot change language with this code
>
> <a href="{$config{https_root}}/cgi/set_lang?lang=fr">FRANÇAIS</a>
>
> I check the diff in file set_lang.pm with the 3.4.1 version and find
> that this piece of code does not work on my site
>
> if ( $session->{request}->scheme() eq "https" )
>
> {
>
> my $samesite = "None";
>
> my $secure = 1;
>
> my $httponly = 0;
>
> }
>
> If I comment this “if” loop everything work fine. The site is https
> all the time.
>
> Any idea why this code does not work on my repository.
>
> Thanks,
>
> *Mario Beaudoin*
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cbe4755c93feb40360e6708d925eceb57%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582521764257813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HaHfpqJ14Ff3HAajTVL0qIssOPDdJzaaius8PCsX%2Fmc%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cbe4755c93feb40360e6708d925eceb57%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582521764257813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=01EZ%2BKUJIX5fjGEOviudQujpf0P%2FONYJKIwG0x95HL8%3D&reserved=0
--
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cbe4755c93feb40360e6708d925eceb57%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637582521764257813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NtwwpjwGGqcdZohDvTysrS42guK3vXeC6sIpR2FM1R0%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210602/779851d4/attachment-0001.html
More information about the Eprints-tech
mailing list