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
F4011398: D25605.1746625908.diff
Tue, May 6, 13:51
F3982727: D25605.1746558328.diff
Mon, May 5, 19:05
F3980746: D25605.1746542648.diff
Mon, May 5, 14:44
F3968860: D25605.1746522381.diff
Mon, May 5, 09:06
F3962982: D25605.1746511821.diff
Mon, May 5, 06:10
F3958909: D25605.1746500396.diff
Mon, May 5, 02:59
F3936464: D25605.1746421358.diff
Sun, May 4, 05:02
F3922954: D25605.1746363675.diff
Sat, May 3, 13:01
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