使用SQL注入appScan进行身份验证绕过

时间:2013-07-18 07:55:08

标签: asp.net vb.net

进行安全扫描时,此错误显示为高:

补救任务:从用户输入过滤掉危险字符?

表示参数(Parameter = txtPassword),(Parameter = btnLogin)和(Parameter = txtName) 所有这些都在这里的代码中使用:

---------------

With sqlcomm.Parameters
            .AddWithValue("@userName", DataEncryption.DataEncryption.EncryptString(LCase(txtName.Text), "OmSs23re24&&UsErNa(Me"))
            .AddWithValue("@Pass", DataEncryption.DataEncryption.EncryptString(txtPassword.Text, "OmSP12aSsW%%8oR*d"))
  End With


If (Session("Admin") Is Nothing) Then
                    If txtName.Text = txtPassword.Text Or forgotpassCls.GetUserLoginFlag(Session("custid").ToString()) Then
                        If ForceChange = "True" Then
                            Response.Redirect("ChangePassword.aspx", True)
                        Else
                            Response.Redirect(DefaultURL, True)
                        End If


                    End If
                Else '' if the user is an admin
                    If txtName.Text = txtPassword.Text Or forgotpassCls.GetUserLoginFlag(Session("Admin").ToString()) Then
                        If ForceChange = "True" Then
                            Response.Redirect("ChangePassword.aspx", True)
                        Else
                            Response.Redirect(DefaultURL, True)
                        End If


                    End If
                End If

我能做什么请帮助?

0 个答案:

没有答案