Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Conversation

@rgraber
Copy link
Contributor

@rgraber rgraber commented Feb 17, 2023

Leaving the escapes in results in CommandError: The password hash provided for user honor is invalid. when trying to provision for the first time. See #997.


I've completed each of the following or determined they are not applicable:

  • Made a plan to communicate any major developer interface changes (or N/A)

Leaving the escapes in results in `CommandError: The password hash provided for user honor is invalid.` when trying to provision for the first time.
# Set staff flag for staff user
if [[ $user == "staff" ]] ; then
docker-compose exec -T lms bash -e -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker --service-variant lms manage_user $user $email --initial-password-hash \'$demo_hashed_password\' --staff"
docker-compose exec -T lms bash -e -c "source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms --settings=devstack_docker --service-variant lms manage_user $user $email --initial-password-hash '$demo_hashed_password' --staff"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of script injection possibilities here (before and after, and unrelated). If we wanted to be safe, we could use printf with %q -- but it's probably not worth fixing in this context.

@rgraber rgraber merged commit ace03e5 into master Feb 21, 2023
@rgraber rgraber deleted the rsgraber/20230217-fix-provisioning-escaped-quotes branch February 21, 2023 12:44
nsprenkle pushed a commit that referenced this pull request Nov 21, 2023
Leaving the escapes in results in `CommandError: The password hash provided for user honor is invalid.` when trying to provision for the first time.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants