[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] set_lang on 3.4.3



CAUTION: This e-mail originated outside the University of Southampton.
Hi David,
The patch does the job, everything works fine now

I do not have a recent version of CGI::Cookie Perl package installed.

Thank you,

MarioDe : eprints-tech-bounces at ecs.soton.ac.uk <eprints-tech-bounces at ecs.soton.ac.uk> De la part de David R Newman via Eprints-tech
Envoy? : 2 juin 2021 13:36
? : Beaudoin, Mario via Eprints-tech <eprints-tech at ecs.soton.ac.uk>
Objet : Re: [EP-tech] set_lang on 3.4.3


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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fAtF8vQmtBSg6TQvUXCHm1gai4BPLI2G%2FFwZa5RaJh0%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F118&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fAtF8vQmtBSg6TQvUXCHm1gai4BPLI2G%2FFwZa5RaJh0%3D&amp;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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=E4KhUdpHx2b%2FNtk1d62euF7Xj6pq4Wml8hmefya4ge4%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommit%2F8c18cd49c65597539bd3fe9c1c97ef05c52694f7&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=E4KhUdpHx2b%2FNtk1d62euF7Xj6pq4Wml8hmefya4ge4%3D&amp;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&#199;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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AW8wG1bpPUnesQDXcdsWLAghNfejaUixNKU7XV4sTZA%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=AW8wG1bpPUnesQDXcdsWLAghNfejaUixNKU7XV4sTZA%3D&amp;reserved=0>

*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=cqzQ0ASy7xF9Dk9NU78G6Hs5s3jo3h%2BObGRO7EiW3Bg%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089295649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=cqzQ0ASy7xF9Dk9NU78G6Hs5s3jo3h%2BObGRO7EiW3Bg%3D&amp;reserved=0>

[Image supprim?e par l'exp?diteur.]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089305612%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Xe0kr6YlE%2BVOGsA26iXXxFkE92mUh2juEpmvIUw4N0E%3D&amp;reserved=0>
Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089305612%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UE0ydsBqxZ%2B2WjQyaxKcvR8zbvRrVUxVMv3pwQ0lmPY%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5acd4f71cb754b1ad07608d92779f976%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584227089305612%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Xe0kr6YlE%2BVOGsA26iXXxFkE92mUh2juEpmvIUw4N0E%3D&amp;reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210604/e79de59a/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 350 bytes
Desc: image001.jpg
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210604/e79de59a/attachment-0001.jpg