~sircmpwn/sr.ht-dev

builds.sr.ht: Force LF line endings for secrets v1 PROPOSED

Mykyta Holubakha: 1
 Force LF line endings for secrets

 1 files changed, 2 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/4954/mbox | git am -3
Learn more about email & git

[PATCH builds.sr.ht] Force LF line endings for secrets Export this patch

---
 buildsrht/blueprints/secrets.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildsrht/blueprints/secrets.py b/buildsrht/blueprints/secrets.py
index e057605..d4ff436 100644
--- a/buildsrht/blueprints/secrets.py
@@ -44,8 +44,8 @@ def secrets_POST():
            valid.expect(bool(_secret) ^ bool(secret_file),
                    "Either secret text or file have to be provided", field=f)
        if _secret:
            _secret = _secret.replace(r'\r\n', r'\n')
            if not _secret.endswith(r'\n'):
            _secret = _secret.replace('\r\n', '\n')
            if not _secret.endswith('\n'):
                _secret += '\n'
        else:
            _secret = secret_file
-- 
2.15.1
Thanks!

To git.sr.ht:~sircmpwn/builds.sr.ht
   6dd349e..3caee6d  master -> master