Cyrillic comments break posts
Closed this issue · 5 comments
Server Software
- Shimmie version: 2.11.0-alpha+
- Database: sqlite 3.37.2
- Web server: lighttpd/1.4.63
Last night a Russian spambot left an anonymous comment in cyrillic on my public facing Shimmie install, rendering the respective post unviewable ONLY for admins. Normal users can view the post and comment correctly.
Here's what admins get when trying to view the affected post:
Internal Error
Message: Unexpected false
Version: 2.11.0-alpha (on 8.3.2-1+ubuntu22.04.1+deb.sury.org+1)
Stack Trace:
#0 /var/www/html/core/stdlib_ex.php(34): false_throws()
#1 /var/www/html/ext/comment/theme.php(258): json_encode_ex()
#2 /var/www/html/themes/lite/comment.theme.php(11): Shimmie2\CommentListTheme->comment_to_html()
#3 /var/www/html/ext/comment/theme.php(69): Shimmie2\CustomCommentListTheme->comment_to_html()
#4 /var/www/html/ext/comment/main.php(338): Shimmie2\CommentListTheme->display_comment_list()
#5 /var/www/html/ext/comment/main.php(216): Shimmie2\CommentList->onPageRequest_list()
#6 /var/www/html/core/send_event.php(161): Shimmie2\CommentList->onPageRequest()
#7 /var/www/html/index.php(91): Shimmie2\send_event()
#8 {main}
This also means we can't remove the comment without mucking with the server.
Are you up to date on the main branch? 5d9090c should have fixed this a couple of weeks ago
I'm pretty sure this is fixed, if not please comment with the exact git commit ID you're running <3
Sorry, I've forgotten to reply. Busy week.
I manually applied the fix from that commit and was able to view and delete the bad comment. However, how would I update Shimmie if I've already made mods to the engine? IIRC you can't git pull correctly if you've got local changes
IIRC you can't git pull correctly if you've got local changes
If you git commit
the changes (even just to your local copy, doesn't need to be published anywhere) then git pull
should work. Specifically git pull
by itself will attempt to merge your changes with upstream, and git pull --rebase
will undo your changes, sync with upstream, and then redo your changes on top (I personally find the second one easier to work with, because that makes it easier to switch between "vanilla upstream" and "upstream plus my changes")
I get weird merge errors when attempting to pull.