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
F3355820: D25605.1743877690.diff
Fri, Apr 4, 18:28
F3354542: D25605.1743862184.diff
Fri, Apr 4, 14:09
F3353935: D25605.1743844558.diff
Fri, Apr 4, 09:15
F3353316: D25605.1743832674.diff
Fri, Apr 4, 05:57
F3353041: D25605.1743822103.diff
Fri, Apr 4, 03:01
F3350160: D25605.1743762843.diff
Thu, Apr 3, 10:34
F3348805: D25605.1743743609.diff
Thu, Apr 3, 05:13
F3348213: D25605.1743734749.diff
Thu, Apr 3, 02:45
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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