<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Security implications of loading user style file]]></title><description><![CDATA[<p dir="auto">I'm thinking about adding the ability for my users to load a custom style sheet into my app. Are there any security implications with doing that? Like could they type anything into the style sheet that would allow for some sort of attack? Or does Qt validate the style sheet well enough to prevent this?</p>
<p dir="auto">Right now I'm just loading the file as a QString and then calling setStyleSheet on the main dialog. All sub dialogs are loaded with a parent pointer so the style sheet propagates out.</p>
]]></description><link>https://forum.qt.io/topic/132215/security-implications-of-loading-user-style-file</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 04:08:37 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/132215.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Nov 2021 20:18:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Security implications of loading user style file on Mon, 22 Nov 2021 21:55:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joecfd">@<bdi>JoeCFD</bdi></a> Thanks for the input. I'll have to consider how I can limit that. I really want to avoid creating a whole UI for the user to modify the control looks. I did that before and no one ever used it. I want to offer the option to customize without any real effort on my part because very few people are going to actually use it.</p>
]]></description><link>https://forum.qt.io/post/691241</link><guid isPermaLink="true">https://forum.qt.io/post/691241</guid><dc:creator><![CDATA[Dan203]]></dc:creator><pubDate>Mon, 22 Nov 2021 21:55:56 GMT</pubDate></item><item><title><![CDATA[Reply to Security implications of loading user style file on Mon, 22 Nov 2021 21:53:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> still risky. What if the file size is gigantic? Better to create a pop up for the user to add.</p>
]]></description><link>https://forum.qt.io/post/691240</link><guid isPermaLink="true">https://forum.qt.io/post/691240</guid><dc:creator><![CDATA[JoeCFD]]></dc:creator><pubDate>Mon, 22 Nov 2021 21:53:01 GMT</pubDate></item><item><title><![CDATA[Reply to Security implications of loading user style file on Mon, 22 Nov 2021 20:41:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Since the file is being parsed on load, its hard to imagine how it can be used for an attack<br />
considering it is hard to instrument a buffer overflow or anything that would allow code execution.</p>
]]></description><link>https://forum.qt.io/post/691239</link><guid isPermaLink="true">https://forum.qt.io/post/691239</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Mon, 22 Nov 2021 20:41:43 GMT</pubDate></item><item><title><![CDATA[Reply to Security implications of loading user style file on Mon, 22 Nov 2021 20:41:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> OK thanks. Just wanted to be sure before I exposed it.</p>
<p dir="auto">I really don't want to have to proxy custom styles for the handful of users who actually care about this. We had a system in our old version which was XML based and applied colors and a few other settings to custom drawn MFC controls, but we had maybe a dozen users who actually used it beyond the included styles that I personally wrote. Allowing those people to just edit the CSS would be so much easier.</p>
]]></description><link>https://forum.qt.io/post/691238</link><guid isPermaLink="true">https://forum.qt.io/post/691238</guid><dc:creator><![CDATA[Dan203]]></dc:creator><pubDate>Mon, 22 Nov 2021 20:41:00 GMT</pubDate></item><item><title><![CDATA[Reply to Security implications of loading user style file on Mon, 22 Nov 2021 20:36:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">AFAIR, if the stylesheet contains invalid syntax, it will simply not be applied.</p>
]]></description><link>https://forum.qt.io/post/691237</link><guid isPermaLink="true">https://forum.qt.io/post/691237</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 22 Nov 2021 20:36:52 GMT</pubDate></item></channel></rss>