Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Open)
 FIXED: Sort order variable not properly sanitized
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 September 2006 :  18:38:45  Show Profile
The strtopicsortord variable in forum.asp is not properly sanitized.

To fix this, find the following code in forum.asp file, around line 66, and add the code in red:
Select Case strtopicsortord
	Case "asc"
		strSortOrd = " ASC"
	Case Else
		strSortOrd = " DESC"
		strtopicsortord = "desc"
End Select
<

Support Snitz Forums

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 September 2006 :  18:53:17  Show Profile
Fixed in version 3.4.06.<

Support Snitz Forums
Go to Top of Page

mkervin
Junior Member

100 Posts

Posted - 15 September 2006 :  19:52:40  Show Profile
FYI, Davio I downloaded the update files for 3.4.0.6 from 3.4.0.5 and forum.asp was not one of the files included in the update. The code you listed above I just added to my forum.asp from 3.4.0.5 just a headsup nothing more.<
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 15 September 2006 :  20:07:05  Show Profile
mkervin, I just downloaded the file from sourceforge. I see the forum.asp file in there. You sure you downloaded the right file?<

Support Snitz Forums
Go to Top of Page

mkervin
Junior Member

100 Posts

Posted - 15 September 2006 :  22:33:48  Show Profile
Davio, let me go and redownload it and check. This is the update we are talking about. I just checked the file I have on my machine it is sf2k_34_05up06.zip and there is no forum.asp in it. I can send it to you or upload it to my site so you can download it. It you can point me to the file I need with all the files I would appreciate it. Please I am not trying to be a pain I just want this upgrade to go smoothly for me and I truly appreciate all the work.

Just redownloaded the file and this one does have it in; my original didn't. Boy I am glad I caught it, thanks. File size is different too 230 -- 239. I wish I could tell you what mirror I used on the first one. I believe it was Virgina in North America.<

Edited by - mkervin on 16 September 2006 01:50:39
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 16 September 2006 :  01:53:42  Show Profile
I had updated the sourceforge files with forum.asp file. It seems the updated file has not populated to all the mirrors as yet.

Glad you got it sorted out though.<

Support Snitz Forums
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 17 September 2006 :  09:15:22  Show Profile  Visit richfed's Homepage
OK - I have a modified topic sorting on my forum.asp ... Below is the section in question. Am I properly "sanitized"? If not, any suggestions?

'-------------------------------------------
' FORUM SORTING MOD VARIABLES
'-------------------------------------------

' Code Mod for mypage variable
dim mypage : mypage = request("whichpage")
if ((Trim(mypage) = "") or IsNumeric(mypage) = False) then mypage = 1
mypage = cLng(mypage)

' Topic Sorting Variables
dim strtopicsortord :strtopicsortord = request("sortorder")
'dim strtopicsortfld :strtopicsortfld = request("sortfield")
dim strtopicsortday :strtopicsortday = request("days")
dim inttotaltopics : inttotaltopics = 0
dim strSortCol, strSortOrd

'Select Case strtopicsortord
' Case "asc"
' strSortOrd = " ASC"
' Case Else
' strSortOrd = " DESC"
'End Select


'Select Case strtopicsortfld
' Case "topic"
' strSortCol = "T_SUBJECT" & strSortOrd
' Case "author"
' strSortCol = "M_NAME" & strSortOrd
' Case "replies"
' strSortCol = "T_REPLIES" & strSortOrd
' Case "views"
' strSortCol = "T_VIEW_COUNT" & strSortOrd
' Case "lastpost"
' strSortCol = "T_LAST_POST" & strSortOrd
' Case Else
' strtopicsortfld = "lastpost"
' strSortCol = "T_LAST_POST" & strSortOrd
'End Select
'strQStopicsort = "FORUM_ID=" & Forum_ID
'-------------------------------------------

'##### Modified Topic Sorting 1-1 : replace above 23 lines with below 8 lines
' you also can comment out above "dim strtopicsortfld :strtopicsortfld = request("sortfield")" this line.(optional)
' change original code to function getSortCol(xxx)
if trim(request("sortorder")) <> "" then
strSortCol = getSortCol(strtopicsortord)
else
strSortCol = ""
end if

strQStopicsort = "FORUM_ID=" & Forum_ID
'########## Modified Topic Sorting ##########

if request("ARCHIVE") = "true" then
strActivePrefix = strTablePrefix & "A_"
ArchiveView = "true"
ArchiveLink = "ARCHIVE=true&"
elseif request("ARCHIVE") <> "" then
Response.Redirect "default.asp"
Response.End
else
strActivePrefix = strTablePrefix
ArchiveView = ""
ArchiveLink = ""
end if<

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 September 2006 :  14:53:12  Show Profile
Post a link to a txt version of your file, so I can take a look at it.<

Support Snitz Forums
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 17 September 2006 :  15:21:41  Show Profile  Visit richfed's Homepage
Okie dokie: link removed<

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]

Edited by - Davio on 17 September 2006 17:40:02
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 September 2006 :  17:39:32  Show Profile
Rich, your file is ok.<

Support Snitz Forums
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 18 September 2006 :  06:13:02  Show Profile  Visit richfed's Homepage
Thanks, Davio!<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07