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

[EP-tech] set_lang on 3.4.3



Hi Mario,

For yours and other people's reference I have added this as a known 
issue with 3.4.3:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_3.4.3%23Requesting_.2Fcgi.2Fset_lang_causes_an_internal_server_error&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BKDWk%2Bz0P3%2Fz1mZuWA6abf3mSlP119v4aSuJSd98Apg%3D&reserved=0

This gives bit more detail about which version of CGI::Cookie you need 
(tl;dr; Ubuntu 18.04/20.04 and RHEL/CentOS 8 have a recent enough 
version RHEL/CentOS 7 does not) and how to go about upgrading the 
CGI::Cookie package if necessary.

I have made a few further amendments to SetLang.pm (see 
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommit%2F94aa768e930445c3b75c9a98f74cb35e8008939d&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=H1KkimFhoucurZaQgKZhlDpH%2Bdo7NzBpHprQ0tlqDWI%3D&reserved=0). 
This is not an essential patch, it just makes sure that if an invalid 
referrer (i.e. the URL to return to after setting the language) is set 
then it should take you back to the frontpage of the repository but this 
was broken and you would end up being stuck on the /cgi/set_lang.? This 
is not a major problem as it still loads the repository template so 
there should be a menu of links to navigate elsewhere.

Regards

David Newman

On 04/06/2021 17:58, Beaudoin, Mario wrote:
> *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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=xDxrYZshqLP3xDsTyEMA0TIIKFxbj07yGD3CaeGcvhA%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=xDxrYZshqLP3xDsTyEMA0TIIKFxbj07yGD3CaeGcvhA%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=lP%2FMbq6JDR6MhDY4QD6N8OCwZyyyNyWbo6hHpnYEzK8%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180340596%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=lP%2FMbq6JDR6MhDY4QD6N8OCwZyyyNyWbo6hHpnYEzK8%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  <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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=D0HCi3gS5hBITytYC8swOD6waRaihqsgUIQSdGlLX18%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=D0HCi3gS5hBITytYC8swOD6waRaihqsgUIQSdGlLX18%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9ltNQP7VtLoaO39ZNdjHD2bflTxyeAxWvbW%2Bgz%2BGgL8%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=9ltNQP7VtLoaO39ZNdjHD2bflTxyeAxWvbW%2Bgz%2BGgL8%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=w1EWlaE2JvqqShL2fpoEB29TMEjfCpEYmCvpIzYsN8s%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=scbvbFyVHZtawkWqZd0fx41syl8Ao3B54K8xm%2FPksrY%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%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=w1EWlaE2JvqqShL2fpoEB29TMEjfCpEYmCvpIzYsN8s%3D&amp;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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cd0042eb129144943133508d9277bdb80%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637584235180350553%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2ZTvT4kwFg8lZapFUtO12QszqOBtBajfbrR%2FpLXqZt0%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210604/39c6deb0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 350 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210604/39c6deb0/attachment-0001.jpg