Skip to content

Revert "Filter out [ct:xxx] tags to prevent PE client crashes"#3276

Open
ACaiCat wants to merge 2 commits intogeneral-develfrom
revert-3193-general-devel
Open

Revert "Filter out [ct:xxx] tags to prevent PE client crashes"#3276
ACaiCat wants to merge 2 commits intogeneral-develfrom
revert-3193-general-devel

Conversation

@ACaiCat
Copy link
Copy Markdown
Member

@ACaiCat ACaiCat commented Mar 17, 2026

Reverts #3193

Terraria PE v1.4.5.6 totally resolves the CT tag crash bug

@ACaiCat ACaiCat closed this Mar 18, 2026
@ACaiCat ACaiCat reopened this Apr 3, 2026
@ACaiCat ACaiCat marked this pull request as ready for review April 3, 2026 09:36
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 3, 2026

Greptile Summary

This PR reverts #3193 by removing the [ct:xxx] chat tag filter and the associated AllowCtTag configuration option, based on the claim that Terraria PE v1.4.5.6 resolves the crash bug that originally motivated the filter. The code changes are clean — the regex, the config field, and the now-unused using System.Text.RegularExpressions import are all consistently removed.

Confidence Score: 5/5

Safe to merge assuming the target Terraria server version requires PE clients to be on v1.4.5.6 or later.

The revert is mechanically clean — the regex, config field, and unused import are all removed consistently with no dangling references. The only non-blocking consideration is whether older PE clients (pre-1.4.5.6) can still connect and be crashed by [ct:xxx] tags, but that is a deployment/versioning question rather than a code defect.

No files require special attention.

Important Files Changed

Filename Overview
TShockAPI/TShock.cs Removes the [ct:xxx] regex filter from OnChat and the now-unused System.Text.RegularExpressions import; no remaining Regex usages in the file.
TShockAPI/Configuration/TShockConfig.cs Removes the AllowCtTag config field; no remaining references to it exist anywhere in the codebase.

Sequence Diagram

sequenceDiagram
    participant PC as Terraria Client (PC/PE)
    participant TS as TShock OnChat Handler
    participant Srv as Server/Other Players

    PC->>TS: Send chat message (may contain [ct:xxx] tags)
    Note over TS: Truncate if necessary
    TS->>Srv: Forward chat text as-is
    Srv-->>PC: Broadcast to all players

    Note over PC: PE v1.4.5.6+ handles [ct:xxx] tags without crashing
Loading

Reviews (1): Last reviewed commit: "Revert "Filter out [ct:xxx] tags to prev..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@lost-werewolf lost-werewolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mobile v1.4.5.6 patches all invalid ControlsTouch tags from my testing. Hopefully for good this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants