Project

General

Profile

Bug #2640

Sign out button is missing protocol

Added by Taylan Develioglu about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

On 1.2RC2

Sign out url is missing the protocol prefix (http or https).

This causes logout to fail when logged in on https and foreman is unavailable on http.

Associated revisions

Revision 1ff6a50c (diff)
Added by Marek Hulán about 6 years ago

Fixes #2640 - use relative user logout path

Revision 9c8adebe (diff)
Added by Marek Hulán about 6 years ago

Fixes #2640 - use relative user logout path
(cherry picked from commit 1ff6a50c16ef6e8bf8b1aa709ec2f8769ba70d79)

History

#1 Updated by Dominic Cleal about 6 years ago

I don't this here, the link has a full URL including protocol. What appears in the link - only the path, only the hostname onwards?

#2 Updated by Taylan Develioglu about 6 years ago

fqdn/users/logout

the my account link, for example, is https://fqdn/users/...

#3 Updated by Marek Hulán about 6 years ago

  • Assignee set to Marek Hulán

#4 Updated by Marek Hulán about 6 years ago

  • Status changed from New to Assigned

I can't reproduce. Also nothing in code suggests any nonstandard behavior. However this may be related to your setup if you're running foreman behind proxy. Rails detects HTTPS request behind proxy by various custom headers that your proxy probably does not attach. Make sure you are adding 'X-Forwarded-Proto: https' header correctly.

Although this is not entirely a bug we could change logout_users_url which generates absolute path to logout_users_path which generates only the relative part. This will fix the issue for users with wrongly configured proxy.

#5 Updated by Marek Hulán about 6 years ago

  • Status changed from Assigned to Ready For Testing

#6 Updated by Taylan Develioglu about 6 years ago

You are correct, we are running foreman behind proxy and the header is not added.

#7 Updated by Dominic Cleal about 6 years ago

Would you mind giving the (very small) patch a try? Looks like it'll work to me.

#8 Updated by Taylan Develioglu about 6 years ago

Yes, I tried it and it's fixed. The signout url now has https in it.

#9 Updated by Marek Hulán about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF