aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartianh <martianh@noreply.codeberg.org>2022-12-23 23:27:20 +0000
committermartianh <martianh@noreply.codeberg.org>2022-12-23 23:27:20 +0000
commit7a49c1afdf02b2f152b852e9f94f56af43813599 (patch)
treed437ad09be0781f47c820bec343f6f2d2dcc526f
parente494fb8d507311de8452db3e6f111b1e32cc3c4d (diff)
parent0114d8a43161ed8bf90e988d9125af4ae6e61165 (diff)
Merge pull request 'further harden custom emoji regex filtering' (#360) from anticomputer/mastodon.el:develop into develop
Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/360
-rw-r--r--lisp/mastodon-toot.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 06c49a3..d1e8cbe 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -614,8 +614,8 @@ To use the downloaded emoji, run `mastodon-toot--enable-custom-emoji'."
(shortcode (alist-get 'shortcode x)))
;; skip anything that contains unexpected characters
(when (and url shortcode
- (string-match-p "^[a-zA-Z0-9-_]*$" shortcode)
- (string-match-p "^[a-zA-Z]*$" (file-name-extension url)))
+ (string-match-p "^[a-zA-Z0-9-_]+$" shortcode)
+ (string-match-p "^[a-zA-Z]+$" (file-name-extension url)))
(url-copy-file url
(concat
mastodon-custom-emoji-dir