reverse_proxy = TRUE update.php user 1/admin requires update_free_access set to TRUE

Created on 9 April 2018, almost 7 years ago
Updated 17 March 2023, almost 2 years ago

Took forever to figure out what the problem was to begin with - hoping there is a fix!

Using update.php as admin user 1 does not work when Drupal is run through a reverse proxy when you set:
- $settings['reverse_proxy_addresses'] = array(a.b.c.d', ...);

While having to have this set:
- $settings['reverse_proxy'] = TRUE; (with the above array set to the reverse proxy IP so a users correct IP can be obtained, for logging and or blocking)

With the above set, I receive the following default message:
- In order to run update.php you need to either be logged in as admin or have set $settings['update_free_access'] in your settings.php.

YES if I set update_free_access to TRUE it will work, but that is a step I would like to not make! Nor should I have to...

If I comment out reverse_proxy_address, it no longer sees the IP address I am accessing the site from, and defaults to the reverse proxy IP BUT logged in as admin user 1 update.php works as expected (WITHOUT setting update_free_access to TRUE)

I have searched everywhere for several weeks, thinking this was permissions problem or a setup problem to no avail. As I wasn't sure of the problem till now. Because I'm using Docker on a CentOS Google Compute Instance, using a reverse-proxy nginx container with lets encrypt so each Drupal web container I spin up (using Drupal/Docker as the base for the images, with minor customization's) Essentially each Drupal web container is php 7 apache debian (as is defined by drupal/docker) but each domain is handled thru the reverse-proxy nginx container so it all works nice and smooth - at least for me moving away from dedicated cPanel servers.

Anyway, the problem can be reproduced and duplicated..

Across 7 different Drupal 8 sites on the same reverse proxy network - they are all doing the same thing..
- So I either deal with having to change the update_free_access or don't get proper IP's - frustrating

YES - I can use drush, however I work with other admins who need to be able to use update.php through a web browser that are not technical enough to use command line.

If I knew where to begin on trying to create a patch, but this is outside the scope of knowledge with drupal (as I'm just getting into drupal 8, coming from years and years and years of 7.

Hoping someone can either point me in the right direction to a solution or supply a fix for this issue, as I cannot find anything anywhere that even seams to relate.

Thx - sidgrafix

πŸ› Bug report
Status

Closed: works as designed

Version

9.5

Component
Database updateΒ  β†’

Last updated 8 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States sidgrafix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than 6 months ago with a request for more information and there has been no activity since that time.

    Since we need more information to move forward with this issue, I am tagging for Bug Smash Initiative and keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: works as designed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States sidgrafix

    Closing this, as at some point a later version of Drupal 8 the update page (update.php) started working without any problems when website is served thru a reverse proxy and having "reverse_proxy = True" set (I have no idea what version it was resolved in) "I honestly forgot this ticket was even open until it was updated for Bug Smash Initiative" and I don't believe it ever affected any Drupal 9 installations, at least to the best of my knowledge!

Production build 0.71.5 2024