EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08635


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

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://github.com/eprints/eprints3.4/issues/118

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://github.com/eprints/eprints3.4/commit/8c18cd49c65597539bd3fe9c1c97ef05c52694f7

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="">

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: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

Virus-free. www.avg.com