<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>XSS on 耕作筆記本</title>
		<link>https://dailybrew.dev/tags/xss/</link>
		<description>Recent content in XSS on 耕作筆記本</description>
		<generator>Hugo</generator>
		<language>zh-tw</language>
		
		
		
		
			<lastBuildDate>Tue, 25 Oct 2016 02:58:14 +0000</lastBuildDate>
		
			<atom:link href="https://dailybrew.dev/tags/xss/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>[筆記] ASP.NET MVC 改用 Json.Net 回應 JSON 時處理 XSS 問題</title>
				<link>https://dailybrew.dev/posts/2016/10/aspnet-mvc-json.net-xss/</link>
				<pubDate>Tue, 25 Oct 2016 02:58:00 +0000</pubDate>
				<guid>https://dailybrew.dev/posts/2016/10/aspnet-mvc-json.net-xss/</guid>
				<description>&lt;p&gt;其實 ASP.NET MVC 內建的 JavaScriptSerializer 就有做到將 html 給 encode 來預防 xss 了&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://dailybrew.dev/posts/2016/10/aspnet-mvc-json.net-xss/images/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7-2016-10-25-%E4%B8%8A%E5%8D%889.53.04_hu_30323f1da2ab6f2b.webp&#34; alt=&#34;&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;但為了&lt;a href=&#34;http://blog.darkthread.net/post-2012-06-09-json-net-performance.aspx&#34;&gt;效能&lt;/a&gt;跟 &lt;a href=&#34;https://zh.wikipedia.org/wiki/ISO_8601&#34;&gt;ISO 8601&lt;/a&gt; 日期格式考量&lt;/p&gt;&#xA;&lt;p&gt;在我們開發的系統中就把 JavaScriptSerializer 給換成 Json.Net 了 (如下 &amp;amp; &lt;a href=&#34;http://blog.darkthread.net/post-2012-08-30-asp-net-mvc-and-json-net.aspx&#34;&gt;作法的參考網址&lt;/a&gt;)&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
