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

Update Synology DSM deploy hook #2935

Merged
merged 6 commits into from
May 16, 2020
Merged

Commits on May 16, 2020

  1. need to _url_encode anything sent in GET requests

    Fixes issue raised by @tatablack
    tresni committed May 16, 2020
    Configuration menu
    Copy the full SHA
    52b8160 View commit details
    Browse the repository at this point in the history
  2. Fix support for wget

    I'm actually not entirely sure why/how this worked with curl but not wget, but it did.  The short answer is that using a GET does not result in the HTTP_HEADER file being written, instead you must pass in the http_headers param ($2) which will return the HTTP headers as a string.  Luckily, the Token is in both the body and the header.  We need it and the id (and smid if 2fa) cookie to proceed.  So now we parrse the response for that instead of the HTTP_HEADER file.
    
    Interesting side note: wget is fine if the URL contains a \r or \n, but curl will barf on it.  So we need to make sure those are stripped from the token as it will be passed in the URL later.
    tresni committed May 16, 2020
    Configuration menu
    Copy the full SHA
    d15c14a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    668967a View commit details
    Browse the repository at this point in the history
  4. Fix shellcheck issues

    tresni committed May 16, 2020
    Configuration menu
    Copy the full SHA
    3a7c7fe View commit details
    Browse the repository at this point in the history
  5. Allow rotating the default certificate which has no description

    This means, by default, we will rotate the default certificate that comes with the DSM
    tresni committed May 16, 2020
    Configuration menu
    Copy the full SHA
    c7f61f8 View commit details
    Browse the repository at this point in the history
  6. Shellcheck fix

    SYNO_Certificate gets set by _getdeployconf, so this may be an empty string but that's fine
    tresni committed May 16, 2020
    Configuration menu
    Copy the full SHA
    694194b View commit details
    Browse the repository at this point in the history