Page MenuHomePhabricator

Cycle redirect when login new user
Closed, ResolvedPublic

Assigned To
Authored By
jakulov
Nov 21 2013, 1:41 PM
Referenced Files
F83873: snapshot4.png
Nov 21 2013, 9:58 PM
F83872: snapshot3.png
Nov 21 2013, 9:58 PM
F83874: snapshot2.png
Nov 21 2013, 9:58 PM

Description

I Have bug in my phabricator installation. The code is up to date.
I create user from web interface, or user registers by himself, or i recover access from console.
When followed by link such http://mydomain/login/etoken/f5af0f8d3e72d100096a5cf9/?email=info%40mydomain
user gets browser error - "to many redirects on this page."
It's for all users, except my own admin account.

I tried to grant administrator role for new users, but it didn't sloved the bug.

Event Timeline

jakulov raised the priority of this task from to Needs Triage.
jakulov updated the task description. (Show Details)
jakulov added a project: Phabricator.
jakulov added a subscriber: jakulov.

Have no errors in my php or apache2 logs

Can you provide a little more background? Was it working previously, and then you updated this happened? Or this happens on a new install for you?

Chad, I have a clean new installation. My administrator accounts works fine.

  • All things works except new users login.
  • When new user is disabled - the disable message is shown after login.
  • The '/logout/' path works for new users. All other pages redirects to '/' path and then begins cycle redirect on this page
  • No matter if new user has administrator role - the same issue he have.

There's no setup issues, no error logging from apache.

Now I tried to add Google OAuth provider.
New user, registered from this provider works fine. No cycle redirects. Strange...

I have a email domain restriction for user regstration. But mail on this domain hosted on gmail. So it can be used whit Google OAuth.

I'm not able to reproduce this, but someone else has reported a similar issue so I think I'm just not configuring my install correctly.

Can you try setting debug.stop-on-redirect:

phabricator/ $ ./bin/config set debug.stop-on-redirect true

That should show where it's trying to redirect to.

(I don't expect that diff to fix this issue, but it fixes a minor issue I noticed while trying to reproduce this.)

With setting stop-on-redirect i got this:
New user has link http://phab.mydomain/login/etoken/a78b2498c85ecd6786615960/?email=test%40mydomain

  1. /auth/validate/?phusr=Test
  2. /settings/panel/password/?token=a78b2498c85ecd6786615960&email=test%40mydomain
  3. Continue to: /

And than step 3 repeats continuously

If you access some path like /blahblahasdf/, does that loop forever too? Or does it send you to / and then loop forever?

I'm going to create a patch to put a stack trace on that debug screen so we can see exactly what's happening.

I got 404 error on that '/sdsdsdq/'

But on '/maniphest/' or some existing page, I got redirect to '/'

I did git pull in /phabricator/

Ok, now you can see stack traces:

snapshot2.png (346×1 px, 38 KB)

snapshot3.png (299×1 px, 31 KB)

snapshot4.png (356×1 px, 36 KB)

And the last one repeats continuously

Perfect, thanks! Let me look at what's going on...

Does bin/storage upgrade show that you're already up to date? Or does it apply patches when you run it?

In either case, applying D7621 on top of D7620 should fix the issue, I think. The root cause is an account with a verified primary email address but no verification flag on the account.

This shouldn't be possible since 20131112.userverified.2.mig.php should have flagged all accounts with a verified address as verified, and all new verifications should also flag the account. One possible explanation is that 20131112.userverified.2.mig.php hasn't run yet, which is why I asked about bin/storage upgrade.

If you're already up to date, we might have another bug somewhere.

Yes!
I've applied patch D7621 on top of D7620 and than upgrade storage. And that helped.

Many thanks to you, guys!

btrahan assigned this task to epriestley.
btrahan triaged this task as High priority.
btrahan added a subscriber: btrahan.