Skip to content
This repository was archived by the owner on Mar 2, 2020. It is now read-only.
This repository was archived by the owner on Mar 2, 2020. It is now read-only.

escapeshellarg() on Windows can result in incorrect password #13

@mcjim

Description

@mcjim

See codeception-module-drupal-user-registry/src/Drupal/UserRegistry/DrushTestUserManager.php

escapeshellarg($user->pass), where $user->pass is "abc!!!" will result in "abc ".

This, I think, is because the Windows version of escapeshellarg wraps the arg in double quotes. Manually executing the drush command with double quotes also fails (drush upwd name --password="abc!!!") but works with single quotes (drush upwd name --password='abc!!!').

So, I think some alternative method of escaping the password is needed. Windows does normally want the double quotes, so this is an exception to the rule.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions