From 939faea318d9c2107fab3a584bc1c023f3c592e9 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 29 Jan 2016 04:46:32 -0500 Subject: [PATCH] Require strip marker names to not have & ' " < or > in them This is a little far fetched, but meant as a hardening step. No valid strip marker name should have any of those things in them. If a malicious user managed to somehow control the strip marker name, he could make a strip marker that "spanned" different html contexts. Note: I've checked carefully - its impossible for a user to control the strip marker name. This is just a hardening step against any future features. For example, if someone could make a strip marker using the marker name "a','b", then they could create an xss by feeding "\x7UNIQfa+QINU\x7f" to charinsert, which will split on + sign, and create output like regex = '/' . Parser::MARKER_PREFIX . "([^\x7f<>&'\"]+)" . Parser::MARKER_SUFFIX . '/'; $this->circularRefGuard = []; } -- 2.20.1