P
psual
hi
newbie in web design I got some issue concerning a secure redirection
between 2 pages
let say I have a page with a grid (the 'master' page)
in this grid I can select a record, get its pk
then I redirect to another page (the 'detail' page) with the pk as
parameter
like : Response.Redirect("~/details.aspx?idKit=mypk")
during the detail page loading, the idKit is precessed to load or create the
detail records acccording to the idKit value
(in fact there can be other optional parameters)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If Not Page.IsPostBack Then
If IsNothing(Request.Params("idKit")) Then
Response.Redirect("~/erreur/NoAccess.htm")
End If
hfURL.Value = Request.ServerVariables("HTTP_REFERER")
hfKit.Value = Request.Params("idKit")
...... some processing
End If
End Sub
So nothing special, except that one can access manually and directly to the
'detail' page with "../details.aspx?idKit=x"
if "x" exists as a pk in the master table, he will be able to modifie/create
details records without any control
I would like to know if there is a simple way to control this redirection
problem
one more problem : this "detail" page is a generic page that is called by
many "master" pages so we can't test the calling page url
the master page url is simply saved and used to know where to redirect back
after the details processing
I would like to know if there is a simple to control the redirection to kown
if the access to the detail page (and the parameter) is legal
thanks a lot
newbie in web design I got some issue concerning a secure redirection
between 2 pages
let say I have a page with a grid (the 'master' page)
in this grid I can select a record, get its pk
then I redirect to another page (the 'detail' page) with the pk as
parameter
like : Response.Redirect("~/details.aspx?idKit=mypk")
during the detail page loading, the idKit is precessed to load or create the
detail records acccording to the idKit value
(in fact there can be other optional parameters)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
If Not Page.IsPostBack Then
If IsNothing(Request.Params("idKit")) Then
Response.Redirect("~/erreur/NoAccess.htm")
End If
hfURL.Value = Request.ServerVariables("HTTP_REFERER")
hfKit.Value = Request.Params("idKit")
...... some processing
End If
End Sub
So nothing special, except that one can access manually and directly to the
'detail' page with "../details.aspx?idKit=x"
if "x" exists as a pk in the master table, he will be able to modifie/create
details records without any control
I would like to know if there is a simple way to control this redirection
problem
one more problem : this "detail" page is a generic page that is called by
many "master" pages so we can't test the calling page url
the master page url is simply saved and used to know where to redirect back
after the details processing
I would like to know if there is a simple to control the redirection to kown
if the access to the detail page (and the parameter) is legal
thanks a lot