Too many redirects on safari


#1
Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 14.0.3:
Operating system and version (linux):
Apache or nginx version (eg, Apache 2.?):
PHP version , 7.2:

The issue you are facing:
users on an apple/mac cant login and getting a too many redirects error.

Is this the first time you’ve seen this error? (N):

Steps to replicate it:

  1. get a apple or mac device
  2. open safari
  3. log-in

The output of your Nextcloud log in Admin > Logging:

nothing in this log

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

212.178.149.126 - - [21/Jan/2019:10:53:26 +0100] "POST /index.php/apps/user_saml/saml/acs HTTP/1.1" 303 1144 "https://tascc.miniorange.com/moas/verifyuser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15"
212.178.149.126 - - [21/Jan/2019:10:53:26 +0100] "GET / HTTP/1.1" 302 1765 "https://tascc.miniorange.com/moas/verifyuser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15"
212.178.149.126 - - [21/Jan/2019:10:53:26 +0100] "GET /index.php/apps/files/ HTTP/1.1" 302 1226 "https://tascc.miniorange.com/moas/verifyuser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15"
212.178.149.126 - - [21/Jan/2019:10:53:26 +0100] "GET /index.php/apps/files/ HTTP/1.1" 302 1226 "https://tascc.miniorange.com/moas/verifyuser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15"
212.178.149.126 - - [21/Jan/2019:10:53:27 +0100] "GET /index.php/apps/files/ HTTP/1.1" 302 1226 "https://tascc.miniorange.com/moas/verifyuser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15"

#2

Bump…

i updated now to version 15.02 but still a login problem with mac users. any ideas how to solve this?


#3

Do you resolve this problem? I use nextcloud with SAML login have the same problem…:joy: Any other browser is OK, but Safri is can’t…


#4

No i’m still searching for a solution, which is hard without a mac device to test and no support on this matter so far.


#5

I have find the problem, it’s cookie 's pin, I resolve it by delete the cookie check code^.^, :grinning:


#6

Nice where to do that?

i added this in a config.php file but it doesn’t work or at least not resolve the error in safari

<?php
$CONFIG = array (
'session_lifetime' => 600,
'remember_login_cookie_lifetime' => 1,
'session_keepalive' => false,

'skeletondirectory' => '',
);

#7

you should reedit the PHP/request.php 's code about cookie check code.


#8

I really can’t find it. is that on server level or in nextcloud ?


#9

return true before code…


#10

where are you from? hhhh :joy:


#11

thanks, im from holland.

i going to test this now, i can’t believe there is no other option to fix this because this will be overwritten with every update


#12

Didn’t work for me, looking further for solutions.

btw what did you change? i don’t see anything different than what i have original and deleting that whole part ends up in a bigger problem


#13

Ok i tried it again and seems to work to change the last return into “true”
thanks for pointing this out. i know its a security risk doing this workaround, but as long safari keeps giving troubles with samesite cookies this will be the solution.

if somebody else knows a better way to fix this plz let it know.

my code now looks like

public function passesLaxCookieCheck(): bool {
if(!$this->cookieCheckRequired()) {
return true;
}

  $cookieName = $this->getProtectedCookieName('nc_sameSiteCookielax');
  if($this->getCookie($cookieName) === 'true') {
  	return true;
  }
  return true;

}


#14

I went to hometown for the Spring Festival, so haven’t seen your posted, I am happy for your soluting the question…:joy: