PJBlog 170版本重要安全補(bǔ)丁(2009-04-22)所有PJ170用戶必須更新此補(bǔ)丁

[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!

4.22補(bǔ)丁:

增加 Checkxss()重要函數(shù)。

代碼安全由安全小組測(cè)試通過(guò)。

升級(jí)包請(qǐng)下載后直接覆蓋

'==============================================
'補(bǔ)丁修改方法
'==============================================
Action.asp
request("cname") 改成 Checkxss(request.QueryString("cname"))
request("mainurl") 改成 Checkxss(request.QueryString("mainurl"))
request("main") 改成 Checkxss(request.QueryString("main"))
common/function.asp中增加函數(shù)
[code]

'*************************************
'防XSS注入函數(shù) 更新于2009-04-21 by evio
'與checkstr()相比, checkxss更加安全
'*************************************
Function Checkxss(byVal ChkStr)
Dim Str
Str = ChkStr
If IsNull(Str) Then
CheckStr = ""
Exit Function
End If
Str = Replace(Str, "&", "&")
Str = Replace(Str, "'", "´")
Str = Replace(Str, """", """)
Str = Replace(Str, "<", "&lt;") Str = Replace(Str, ">", "&gt;")
Str = Replace(Str, "/", "&#47;")
Str = Replace(Str, "*", "&#42;")
Dim re
Set re = New RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "(w)(here)"
Str = re.Replace(Str, "$1here")
re.Pattern = "(s)(elect)"
Str = re.Replace(Str, "$1elect")
re.Pattern = "(i)(nsert)"
Str = re.Replace(Str, "$1nsert")
re.Pattern = "(c)(reate)"
Str = re.Replace(Str, "$1reate")
re.Pattern = "(d)(rop)"
Str = re.Replace(Str, "$1rop")
re.Pattern = "(a)(lter)"
Str = re.Replace(Str, "$1lter")
re.Pattern = "(d)(elete)"
Str = re.Replace(Str, "$1elete")
re.Pattern = "(u)(pdate)"
Str = re.Replace(Str, "$1pdate")
re.Pattern = "(\s)(or)"
Str = re.Replace(Str, "$1or")
re.Pattern = "(\n)"
Str = re.Replace(Str, "$1or")
'----------------------------------
re.Pattern = "(java)(script)"
Str = re.Replace(Str, "$1script")
re.Pattern = "(j)(script)"
Str = re.Replace(Str, "$1script")
re.Pattern = "(vb)(script)"
Str = re.Replace(Str, "$1script")
'----------------------------------
If Instr(Str, "expression") > 0 Then
Str = Replace(Str, "expression", "e&shy;xpression", 1, -1, 0) '防止xss注入
End If
Set re = Nothing
Checkxss = Str
End Function
[/code]

class/cls_logAction.asp中找到

[code]
oldcname = request.form("oldcname")
oldcate = request.form("oldcate")
oldctype = request.form("oldtype")
[/code]
改成
[code]
oldcname = Checkxss(request.form("oldcname"))
oldcate = Checkxss(request.form("oldcate"))
oldctype = Checkxss(request.form("oldtype"))
[/code]
GetArticle.asp
blog_postFile = request("blog_postFile") 改成 blog_postFile = Cint(Checkxss(request.QueryString("blog_postFile")))

官方下載地址

問(wèn)題未解決?付費(fèi)解決問(wèn)題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信

所寫(xiě)所說(shuō),是心之所感,思之所悟,行之所得;文當(dāng)無(wú)敷衍,落筆求簡(jiǎn)潔。 以所舍,求所獲;有所依,方所成!

支付寶贊助
微信贊助

免責(zé)聲明,若由于商用引起版權(quán)糾紛,一切責(zé)任均由使用者承擔(dān)。

您必須遵守我們的協(xié)議,如您下載該資源,行為將被視為對(duì)《免責(zé)聲明》全部?jī)?nèi)容的認(rèn)可->聯(lián)系老梁投訴資源
LaoLiang.Net部分資源來(lái)自互聯(lián)網(wǎng)收集,僅供用于學(xué)習(xí)和交流,請(qǐng)勿用于商業(yè)用途。如有侵權(quán)、不妥之處,請(qǐng)聯(lián)系站長(zhǎng)并出示版權(quán)證明以便刪除。 敬請(qǐng)諒解! 侵權(quán)刪帖/違法舉報(bào)/投稿等事物聯(lián)系郵箱:service@laoliang.net
意在交流學(xué)習(xí),歡迎贊賞評(píng)論,如有謬誤,請(qǐng)聯(lián)系指正;轉(zhuǎn)載請(qǐng)注明出處: » PJBlog 170版本重要安全補(bǔ)?。?009-04-22)所有PJ170用戶必須更新此補(bǔ)丁

發(fā)表回復(fù)

本站承接,網(wǎng)站推廣(SEM,SEO);軟件安裝與調(diào)試;服務(wù)器或網(wǎng)絡(luò)推薦及配置;APP開(kāi)發(fā)與維護(hù);網(wǎng)站開(kāi)發(fā)修改及維護(hù); 各財(cái)務(wù)軟件安裝調(diào)試及注冊(cè)服務(wù)(金蝶,用友,管家婆,速達(dá),星宇等);同時(shí)也有客戶管理系統(tǒng),人力資源,超市POS,醫(yī)藥管理等;

立即查看 了解詳情