Project

General

Profile

Actions

Patch #44653

closed

Remove leftover development hosts from the OAuth redirect URI HTTPS exemption

Added by Go MAEDA 21 days ago. Updated 16 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:

Description

The Doorkeeper configuration in config/initializers/30-redmine.rb, added in r23837 (#24808), is intended to allow non-HTTPS redirect URIs only for loopback hosts, as stated in its comment. However, the list of exempted hosts contains two values that do not match this intent:

# allow http loopback redirect URIs but require https for all others
force_ssl_in_redirect_uri { |uri| !%w[localhost 127.0.0.1 web localohst:8080].include?(uri.host) }
  • web is not a loopback host, but redirect URIs on it are allowed without HTTPS.
  • localohst:8080 is a typo for localhost and never matches.

The attached patch removes both values.

The patch also adds the IPv6 loopback address ::1, which is a loopback host but is missing from the list. Because URI#host returns this address in brackets ([::1]), the patch compares against URI#hostname instead.


Files

Actions #1

Updated by Go MAEDA 19 days ago

  • Target version changed from Candidate for next minor release to 6.1.6

Setting the target version to 6.1.6.

Actions #2

Updated by Go MAEDA 18 days ago

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA

Committed the patch in r25314.

Actions #3

Updated by Go MAEDA 16 days ago

  • Status changed from Resolved to Closed

Merged the fix into the stable branches in r25331 and r25332.

Actions

Also available in: Atom PDF