From 2b5e7484d5a985a15f64d3c5e4a269548803a477 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Mon, 6 Jan 2025 15:28:42 +0000 Subject: [PATCH] fix regression --- CHANGELOG.md | 4 ++++ jinjafx_server.py | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5467b73..e0b970b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## CHANGELOG +### [25.2.1] - Jan 6, 2025 +- Fixed a regression when adding support for "Delete Link" + ### [25.2.0] - Jan 6, 2025 - Added a "Delete Link" button to allow DataTemplates to be deleted - Added support so a specific DataSet can be selected via the DataTemplate URL using `?ds=` or `/dt/
/` @@ -374,6 +377,7 @@ - Initial release +[25.2.1]: https://github.com/cmason3/jinjafx_server/compare/25.2.0...25.2.1 [25.2.0]: https://github.com/cmason3/jinjafx_server/compare/25.1.1...25.2.0 [25.1.1]: https://github.com/cmason3/jinjafx_server/compare/25.1.0...25.1.1 [25.1.0]: https://github.com/cmason3/jinjafx_server/compare/24.12.1...25.1.0 diff --git a/jinjafx_server.py b/jinjafx_server.py index 9417ad5..0b605dc 100755 --- a/jinjafx_server.py +++ b/jinjafx_server.py @@ -26,7 +26,7 @@ import re, argparse, hashlib, traceback, glob, hmac, uuid, struct, binascii, gzip, requests, ctypes, subprocess import cmarkgfm, emoji -__version__ = '25.2.0' +__version__ = '25.2.1' llock = threading.RLock() rlock = threading.RLock() @@ -667,7 +667,7 @@ def authenticate_dt(rdt, r): cheaders['X-Dt-Authentication'] = 'Modify' if (mm != None) else 'Open' r = [ 'text/plain', 401, '401 Unauthorized\r\n', sys._getframe().f_lineno ] - return r + return mm, mo, r if fpath == '/get_link': dt = json.loads(postdata.decode('utf-8')) @@ -753,7 +753,7 @@ def authenticate_dt(rdt, r): dt_yml += 'encrypted: 1\n' def update_dt(rdt, dt_yml, r): - r = authenticate_dt(rdt, r) + mm, mo, r = authenticate_dt(rdt, r) if r[1] != 401: if dt_protected: @@ -821,7 +821,7 @@ def add_client_fields(dt_yml, remote_addr): dt_yml, r = update_dt(rr.text, dt_yml, r) elif fpath == '/delete_link': - r = authenticate_dt(rr.text, r) + mm, mo, r = authenticate_dt(rr.text, r) if r[1] != 401: rr = aws_s3_delete(aws_s3_url, dt_filename) @@ -892,7 +892,7 @@ def add_client_fields(dt_yml, remote_addr): dt_yml, r = update_dt(content, dt_yml, r) elif fpath == '/delete_link': - r = authenticate_dt(content, r) + mm, mo, r = authenticate_dt(content, r) if r[1] != 401: rr = github_delete(github_url, dt_filename, sha) @@ -954,7 +954,7 @@ def add_client_fields(dt_yml, remote_addr): dt_yml, r = update_dt(rr, dt_yml, r) elif fpath == '/delete_link': - r = authenticate_dt(rr, r) + mm, mo, r = authenticate_dt(rr, r) if r[1] != 401: os.remove(dt_filename)