[Question] adding admin user relies on exec, shell_exec · Issue #1461 · bolt/core · GitHub
Skip to content

[Question] adding admin user relies on exec, shell_exec #1461

Open

Description

@peterboorsma

The bin/console bolt:add-user --admin command line relies on exec and shell_exec. My guess is a lot of (shared) hosting providers have these options disabled by default.

I don't know much about PHP settings and server security , so I do not know if it is save to enable these commands but does this mean that some (a lot?) of users can't use Bolt4?

Activity

  1. bobdenotter commented on Jun 10, 2020

    @bobdenotter
    Member

    What error are you getting exactly, if it's not there?

    I'm not sure we can make that optional, as both Composer and Symfony itself rely on it as well.

  2. peterboorsma commented on Jun 10, 2020

    @peterboorsma
    ContributorAuthor

    I recently updated to PHP 7.3 on my server. I think both exec and shell_exec are disabled by default, so I changed this in the php.ini after I ran into this error.
    When I tried adding a new admin user, by the time a password is being generated, the following error appears in an endless loop:
    [ERROR] Warning: exec() has been disabled for security reasons

    It's not a problem for me personally but I think it's a good idea that this is mentioned in a "system requirements" paragraph in the docs. I know you are still working on the docs btw. ;)

  3. bobdenotter commented on Jun 10, 2020

    @bobdenotter
    Member

    It's not a problem for me personally

    As in: After you were getting that error, you enabled it, and then it was smooth sailing? :-)

  4. peterboorsma commented on Jun 10, 2020

    @peterboorsma
    ContributorAuthor

    Yes. Enabled them, restarted PHP. Problem solved.

  5. bobdenotter commented on Jun 11, 2020

    @bobdenotter
    Member

    Ok, will add to docs!

  6. added this to the Bolt 4.0.0 stable milestone on Jun 11, 2020
  7. I-Valchev commented on Sep 1, 2020

    @I-Valchev
    Member

    Let's bump this to 4.1 for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions