Skip to content

Commit

Permalink
Merge pull request #60 from cmason3/dev
Browse files Browse the repository at this point in the history
fix regression
  • Loading branch information
cmason3 authored Jan 6, 2025
2 parents 48d0cca + 2b5e748 commit 608d1ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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/<dt>/<ds>`
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions jinjafx_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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'))
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 608d1ec

Please sign in to comment.