I have created a new class to secure the URL params to make links more secure.
In order to use the new class you must include the following files
<!– #include File=”../../wwwroot/appservices/Crypt.asp” –>
<!– #include File=”../../wwwroot/appservices/SecureURLParamManager.asp” –>
The following is as ample for how to use the SecureURLParamManager
set paramMgrObj = New SecureURLParamManager
paramMgrObj.addParameter "yearbook_id", yearbookId
paramMgrObj.addParameter "size", 200
paramMgrObj.addParameter "front_back", "FRONT"
paramMgrObj.addParameter "crop", 1
coverFile = "/appservices/CoverRenderer.asp?yearbook_id=" & yearbookId & "&size=2000&front_back=FRONT&crop=1" ' OLD WAY - NOT SECURE
' NEW Secure Way to Pass URLs
coverFile = "/appservices/CoverRenderer.asp?" & paramMgrObj.renderSecureURLParameters()
The url with then appear like the following
https://stage.edo.entourageyearbooks.com/appservices/CoverRenderer.asp?params=32505F5D48245B46052E430806737E63021E403345520E1C13637045425C5B5F603D4B4B270010326A7A1562463742467E6D
Where params holds the encrypted parameters
Then to get the parameters into variables you can use the following code
if request("params") <> "" then
set paramObj = New SecureURLParamManager
paramObj.initialize request("params")
yearbookId = paramObj("yearbook_id")
coverComponent = paramObj("component")
isfront = paramObj("front_back")
size = paramObj("size")
crop = paramObj("crop")
isSpine = paramObj("spine")
spreadId = paramObj("spread_id")
else
yearbookId = request("yearbook_id")
coverComponent = request("component")
isfront = request("front_back")
size = request("size")
crop = request("crop")
isSpine = request("spine")
spreadId = request("spread_id")
end if
Not how I’ve made the code backward compatible to still pull variables from “Request” object in case there is any code that still uses the unsecure way to call the page.
The following are the pages that needs to be updated to use the new parameters
- edo/appservices/CoverRenderer.asp
- edo/appservices/LadderPagePreview.asp
- edo/appservices/PageRenderer.asp
- edo/appservices/EDImage.asp
Find all the locations where this code is used, using a “FIND” at the command prompt should build up some lists.