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

Export the production domain as the URI when exporting drush aliases #2481

Open
deviantintegral opened this issue Jun 13, 2023 · 1 comment

Comments

@deviantintegral
Copy link

Platform

(x) MacOS
(x) Linux
(x) WSL2

Installed Via

( ) Homebrew
( ) Apt Package
(x) Manually

PHP Version

( ) 7.4x
( ) 8.0
(x) 8.1

Terminus Version

Terminus 3.2.1

Command Executed

terminus drush:aliases --only <site id>

Expected behavior

drush aliases use the primary domain of a site, so commands like drush user:login use the production domain.

Actual behavior

The drush alias contains a URI set to the pantheonsite.io domain, even though the site is live:

'*':
  host: appserver.${env-name}.REDACTED.drush.in
  paths:
    files: files
  uri: ${env-name}-REDACTED.pantheonsite.io
  user: ${env-name}.REDACTED
  ssh:
    options: '-p 2222 -o "AddressFamily inet"'
    tty: false

In contrast, terminus drush uses the right domain:

$ terminus drush SITE-ID.live st
Drupal version   : 9.5.9
Site URI         : http://example.com

This results in confusing issues when developers or CI use both styles of commands to access a production site.

@deviantintegral
Copy link
Author

@greg-1-anderson 👋 should I file a separate issue for the site URI rendering as http and not https? This could lead to inadvertent exposure of user:login URLs where a malicious proxy could intercept the request and steal the session cookie.

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

1 participant