Page MenuHomePhorge

PhutilRemarkupHexColorCodeRule: Do not assume that parameter is a string
ClosedPublic

Authored by aklapper on Apr 29 2024, 20:23.
Tags
None
Referenced Files
F3553969: D25605.1744967607.diff
Thu, Apr 17, 09:13
F3553908: D25605.1744962866.diff
Thu, Apr 17, 07:54
F3553907: D25605.1744962863.diff
Thu, Apr 17, 07:54
F3553651: D25605.1744949058.diff
Thu, Apr 17, 04:04
F3534648: D25605.1744893390.diff
Wed, Apr 16, 12:36
F3527199: D25605.1744834668.diff
Tue, Apr 15, 20:17
F3503623: D25605.1744798295.diff
Tue, Apr 15, 10:11
F3426552: D25605.1744651073.diff
Sun, Apr 13, 17:17
Tokens
"Pirate Logo" token, awarded by aklapper."Pterodactyl" token, awarded by valerio.bozzolan.

Details

Summary

Check type before potentially mangling HTML in a PhutilSafeHTML element.
For now, do not try to apply this renderer when not dealing with a plain string.

Closes T15802

Test Plan

After deleting the corresponding MarkupCache via DELETE FROM phabricator_cache.cache_markupcache WHERE cacheData LIKE "%whatever description on the page%"; check the description of a page, e.g. of /config/edit/security.require-https/ or /config/edit/storage.default-namespace/.

Diff Detail

Repository
rP Phorge
Branch
T15802 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1205
Build 1205: arc lint + arc unit

Event Timeline

Interesting. Thanks.

Added minor tip.

src/infrastructure/markup/markuprule/PhutilRemarkupHexColorCodeRule.php
17–19
This revision is now accepted and ready to land.Apr 29 2024, 20:41

Double-accept. This means you unlocked a rare pterodactyl1!1

valerio.bozzolan added inline comments.
src/infrastructure/markup/markuprule/PhutilRemarkupRule.php
21

THIS STAR IS SUPER-IMPORTANT THE WHOLE INSFRASTRUCTURE IS BASED ON THIS

Use correct markup for comment about markup