Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Unconfirmed critical) Base path messed up by Drupal console after cache rebuild #3222

Closed
nvaken opened this issue Mar 10, 2017 · 3 comments
Closed

Comments

@nvaken
Copy link
Contributor

nvaken commented Mar 10, 2017

Steps to reproduce.
Note that database:dump is probably easily replaced by any other command, just as long as Drupal Console gets run right after the caches have been emptied.

  1. drupal cr all
  2. drupal database:dump --file=test.sql

Now check your Drupal install, most notably assets that are being loaded (images, CSS, JS, etc..). Probably all or just some assets will have your Drupal Console binary root path as base_path. In Drupal Console Launcher, on Mac, this might potentially result in a path like:

http://localhost/PATH/TO/DRUPAL/WEB/http:/:/usr/local/bin/sites/default/files/styles/visual/public/2017-03/visual.jpg?itok=_nxSlCtU

This essentially breaks the entire Drupal installation, only after clearing caches again and making sure the next interaction with Drupal is through HTTP, you'll get the correct base path again.

Critical
I think this is a highly critical issue and should be solved as quickly as possible, due to:

  1. The procedure isn't that uncommon (clearing caches and immediately running another DC command)
  2. Will wreck the site untill a next cache rebuild (our login form was even to badly damaged to login anymore through HTTP)
  3. Exposes potentially sensitive server-side information (path to DC binary)

CC: @jmolivas

@nvaken nvaken changed the title (Unconfirmed critical) Base path gets screwed by Drupal console (Unconfirmed critical) Base path messed up by Drupal console after cache rebuild Mar 10, 2017
@ruloweb
Copy link
Contributor

ruloweb commented Mar 16, 2017

I was trying to reproduce the issue, and noticed that it only appends for anonymous users. To keep in mind.

@nvaken
Copy link
Contributor Author

nvaken commented Mar 31, 2017

Probably because most caching functions are (by default) only available for anonymous users. Still, since most setups will have way more anonymous users then authenticated, this remains critical I think.

@jmolivas
Copy link
Member

jmolivas commented Apr 8, 2017

Fixed with #3248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants