Repository navigation
Phase 4: writing - #5
Merged
Merged
Conversation
…d them One PostService holds the permissions, suspension, flood and time limits, approval, forum switches and the edit history. Attachments are stored under random names in a folder the web server cannot reach and served by attachment.php. Post text is now stored as typed, because the IPF textarea type ran it through HTMLPurifier on save. Verified by clicking through an ImpressCMS 2.0.4 installation as guest, member, second member and webmaster. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MZy45V5RV9nx6Buq8vqKHr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Posting, replying, editing and deleting, attachments, notifications and the rules around them. Moderation from the front end (move, merge, split, lock, approve, reports) stays in phase 5.
How
PostServiceholds every rule: the permissionsforum_post,forum_reply,forum_edit,forum_delete,forum_attachandforum_noapprove, suspensions, a flood limit, a time limit for members, locked topics, what the forum allows (HTML, signature, prefix), approval and the edit history. Members delete only their own last post of a topic.post.phpis a thin controller on the IPF secure form, with preview, disclaimer and a captcha for guests. Everything that writes is a POST with a token, and the request is read field by field, so extra fields change nothing.Uploaderchecks the extension against the forum list and a list that is never accepted, plus the size. Files get a random name without extension in a folder with a deny-all.htaccess.attachment.phpchecks read permission and the karma lock, counts the download and always sends it as a download.Decisions to look at
XOBJ_DTYPE_OTHER). The IPF textarea type runs every text through HTMLPurifier when saving, which turned[b]into HTML for good and made the HTML, smiley and line break switches of a post meaningless. The text is made safe when shown, and the edit form escapes it.post.phpis the gate. Phase 5 adds the screens.Testing
.phpis refused even when the forum lists it, as is a file over the limit), quick reply, quote, preview, edit with history, delete, flood, time limit, captcha for guests, a notification message to a subscriber. Found and fixed along the way: notification titles were not translated, andnotification_update.phpwas missing.Generated by Claude Code