View Single Post
  #23 (permalink)  
Old May 22nd, 2002
tshdos tshdos is offline
Gnutella Veteran
 
Join Date: March 24th, 2002
Location: Virginia
Posts: 101
tshdos is flying high
Default

I just looked at your newest version (0.3). Looks good but I have a couple of suggestions for you.


Line 23:
If Request.Querystring("restart") = 1 Then StartASPEngine '//Change The Default Value


You should probably remove this or add a check for security.


Line 40-47:
If Request.Querystring("url") <> "" Then
UpdateHostCache
Status = "OK"
End If
If Request.Querystring("ip") <> "" Then
UpdateHostCache
Status = "OK"
End If


The way it is setup Request.QueryString("url") is checked up to 4 times and ip is checked up to 3 times. I would suggest changing the behavior of 'UpdateHostCache' to return the status and replace the lines above with:
Status = UpdateHostCache() ' Return "" if no update
Response.Write Status


Line 251-270:
Function IsValidIp


Should add a little more checking. The way it is right now if I sent the ip 0.0.0.0 or 255.255.255.255 or 999.999.999.999 it would pass even though it shouldn't.

Need to block these ips also: 10.*.*.*, 255.255.255.255, 172.16.*.* - 172.31.*.*, 0.0.0.0. ip range 192 should be changed to 192.168.*.*


I did this too but unless you can think of a reason, I see no reason to store the ip and port separately.

Also, just curious but why no locks?
Reply With Quote