Skip to content

Commit

Permalink
Escape link info on update
Browse files Browse the repository at this point in the history
  • Loading branch information
le717 committed Aug 17, 2021
1 parent ed18a5e commit 23a91c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.0.3

_Unreleased_

- Escape link info on update

# 1.0.2

_Released August 16, 2021_
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ services:
- 127.0.0.1:5000:80
environment:
- FLASK_ENV=production
- SYS_VARS_PATH=/app/secrets
- TIMES_FAILED_THRESHOLD=5
3 changes: 2 additions & 1 deletion src/core/database/weblink.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def update(data: OrderedDict) -> bool:
return False

db.session.query(WebLink).filter_by(id=data["id"]).update(
data, synchronize_session="fetch"
{k: Markup(v).striptags() for k, v in data.items()},
synchronize_session="fetch",
)
db.session.commit()
return True

0 comments on commit 23a91c3

Please sign in to comment.