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
F2980235: D25605.1739884115.diff
Mon, Feb 17, 13:08
F2977362: D25605.1739637361.diff
Fri, Feb 14, 16:36
F2977355: D25605.1739637008.diff
Fri, Feb 14, 16:30
F2977354: D25605.1739637001.diff
Fri, Feb 14, 16:30
F2977353: D25605.1739636995.diff
Fri, Feb 14, 16:29
F2977323: D25605.1739634874.diff
Fri, Feb 14, 15:54
F2976254: D25605.1739586830.diff
Fri, Feb 14, 02:33
F2962778: D25605.1739181962.diff
Sun, Feb 9, 10:06
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