• Brian Hartvigsen's avatar
    Make certificate descriptions sed safe · 74a4a788
    Brian Hartvigsen authored
    This escapes special characters used in POSIX sed to prevent mismatches.
    e.g. `SYNO_Certficiate=*.example.com` would not match a description of
    "*.example.com" and would look to match any number of double quotes (the
    last character in the sed regex prior to certificate description),
    followed by any single character, followed by "example", followed by any
    character, followed by "com".
    
    After this change, it will properly match `*.example.com` and not
    `""zexamplefcom`.
    
    Additionally we now store the certificate description as base64 encoded
    to prevent issues with single quotes.
    
    Tested on DSM 7.0-41222 (VDSM) and DSM 6.2.4-25556 (DS1515+).
    74a4a788
synology_dsm.sh 6.5 KB