Skip to content

ROCK-8362: Sanitize CustomSchedule - #206

Merged
jwakefield-secc merged 2 commits into
masterfrom
ROCK-8362/publish-group-schedule-sanitization
Apr 2, 2026
Merged

ROCK-8362: Sanitize CustomSchedule#206
jwakefield-secc merged 2 commits into
masterfrom
ROCK-8362/publish-group-schedule-sanitization

Conversation

@jwakefield-secc

@jwakefield-secc jwakefield-secc commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • FormatScheduleDates() method added to PublishGroup.cs — converts RDATE-based schedules into readable text (e.g., "Tuesdays at 6:30 PM: Aug 5, Aug 19, Sep 2...") instead of storing raw iCal or HTML
  • Replaced FriendlyScheduleText (returns HTML for specific-date schedules) and iCalendarContent (raw iCal) references with FormatScheduleDates across all code paths that populate CustomSchedule
  • Save sanitization.SanitizeHtml() applied on save to strip any HTML that might leak through the textbox
  • Lava defense-in-depth| StripHtml filter added to SECC2019 and SECC2024 GroupFinder templates
  • NullReferenceException fixOnInit now guards publishGroup and publishGroup.Group before accessing GroupTypeId

Test Link: https://sedev.secc.org/page/2006?PublishGroupId=9044

Files Changed

File Changes
Plugins/org.secc.GroupManager/Model/PublishGroup.cs FormatScheduleDates() method, ScheduleText getter sanitization
Plugins/org.secc.GroupManager/org_secc/GroupManager/PublishGroupRequest.ascx.cs Lines 206, 269, 407 (display), 494 (save), OnInit null fix
Plugins/org.secc.Themes/Themes/SECC2019/Assets/Lava/Groups/GroupFinder.lava `
Plugins/org.secc.Themes/Themes/SECC2024/Assets/Lava/Groups/GroupFinder.lava `

Test Plan

  • Open a publish group with an RDATE schedule (specific dates) — Custom Schedule should show "Tuesdays at 6:30 PM: Aug 5, Aug 19..." instead of iCal or HTML
  • Open a publish group with a weekly schedule — Custom Schedule should show normal friendly text
  • Open a new publish group request (no existing record) — page should not throw NullReferenceException
  • Save a publish group and verify CustomSchedule is stored as clean plain text
  • Check group finder page renders schedule text without HTML tags
  • Verify existing iCal records get cleaned up when the publish group page is opened and saved

…n publish groups

- Add FormatScheduleDates() to convert RDATE schedules into readable date lists
  (e.g., "Tuesdays at 6:30 PM: Aug 5, Aug 19, Sep 2...")
- Replace FriendlyScheduleText and iCalendarContent references with FormatScheduleDates
- Apply .SanitizeHtml() on save to strip any remaining HTML from CustomSchedule
- Add | StripHtml in GroupFinder Lava templates as defense-in-depth
- Fix NullReferenceException in OnInit when publishGroup is null
Show first 3 dates + last date for schedules with 5+ specific dates
to prevent overly long Custom Schedule text (e.g., "Tuesdays at 6:30 PM: Aug 5, Aug 19, Sep 2, ... Dec 2")
@jwakefield-secc
jwakefield-secc merged commit 4e175a8 into master Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant