Click here to Skip to main content
15,896,118 members
Home / Discussions / Web Development
   

Web Development

 
QuestionCoralCDN Pin
stevio25-Jul-08 1:24
stevio25-Jul-08 1:24 
AnswerRe: CoralCDN Pin
Johnny ²25-Jul-08 1:35
Johnny ²25-Jul-08 1:35 
GeneralRe: CoralCDN Pin
stevio25-Jul-08 2:12
stevio25-Jul-08 2:12 
GeneralRe: CoralCDN Pin
Johnny ²25-Jul-08 5:53
Johnny ²25-Jul-08 5:53 
GeneralRe: CoralCDN Pin
stevio25-Jul-08 7:14
stevio25-Jul-08 7:14 
Questioni got sql injection attach from 1 month on my website help me plz. Pin
help as an alias25-Jul-08 0:18
help as an alias25-Jul-08 0:18 
AnswerRe: i got sql injection attach from 1 month on my website help me plz. Pin
Ashfield25-Jul-08 1:25
Ashfield25-Jul-08 1:25 
AnswerRe: i got sql injection attach from 1 month on my website help me plz. Pin
L Viljoen25-Jul-08 1:33
professionalL Viljoen25-Jul-08 1:33 
on login boxes it would be safer to user the following way to secure parameters

========================
SQLConnection conn = new SQLConnection("connstring");
SQLCommand comm = conn.CreateCommand();

comm.CommandText = "SELECT * FROM Admins WHERE (uname = @uname) AND (password = @passw);";

comm.Parameters.AddWithValue("@uname",TextBox1.Text);
comm.Parameters.AddWithValue("@passw",TextBox1.Text);


conn.Open();
SQLDataReader reader = comm.ExecuteReader();

if(reader.Read())
{
//loggedIn
}else{
//invalid
}



========================

What uyou can also do is convert your text input to lowercase check your text input for SQL expressions such as " * , select, delete, update.

string s = "Input string got from box";
if(s.Contains("select") || s.Contains("*")){
//Possible injection attack
}

Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com

GeneralRe: i got sql injection attach from 1 month on my website help me plz. Pin
help as an alias25-Jul-08 2:15
help as an alias25-Jul-08 2:15 
GeneralRe: i got sql injection attach from 1 month on my website help me plz. Pin
L Viljoen25-Jul-08 2:41
professionalL Viljoen25-Jul-08 2:41 
GeneralRe: i got sql injection attach from 1 month on my website help me plz. Pin
stevio25-Jul-08 2:57
stevio25-Jul-08 2:57 
GeneralRe: i got sql injection attach from 1 month on my website help me plz. Pin
stevio25-Jul-08 3:00
stevio25-Jul-08 3:00 
AnswerRe: i got sql injection attach from 1 month on my website help me plz. Pin
stevio25-Jul-08 1:58
stevio25-Jul-08 1:58 
AnswerRe: i got sql injection attach from 1 month on my website help me plz. Pin
Paul Conrad27-Jul-08 11:39
professionalPaul Conrad27-Jul-08 11:39 
QuestionAvoid viewing source code Pin
sirisha guttikonda24-Jul-08 20:24
sirisha guttikonda24-Jul-08 20:24 
AnswerRe: Avoid viewing source code Pin
Johnny ²24-Jul-08 22:26
Johnny ²24-Jul-08 22:26 
AnswerRe: Avoid viewing source code Pin
L Viljoen25-Jul-08 2:46
professionalL Viljoen25-Jul-08 2:46 
AnswerRe: Avoid viewing source code Pin
stevio25-Jul-08 2:50
stevio25-Jul-08 2:50 
AnswerRe: Avoid viewing source code Pin
Perspx25-Jul-08 7:17
Perspx25-Jul-08 7:17 
AnswerRe: Avoid viewing source code Pin
Paul Conrad26-Jul-08 18:04
professionalPaul Conrad26-Jul-08 18:04 
QuestionSharepoint web part using DLL created with IKVMC (Java to C# compiler) [modified] Pin
kselman24-Jul-08 8:42
kselman24-Jul-08 8:42 
GeneralRe: Sharepoint web part using DLL created with IKVMC (Java to C# compiler) Pin
Shog924-Jul-08 11:25
sitebuilderShog924-Jul-08 11:25 
QuestionSetting style to a div's overflow scroll bar Pin
DeepToot24-Jul-08 4:14
DeepToot24-Jul-08 4:14 
GeneralRe: Setting style to a div's overflow scroll bar Pin
Shog924-Jul-08 7:39
sitebuilderShog924-Jul-08 7:39 
GeneralRe: Setting style to a div's overflow scroll bar Pin
DeepToot24-Jul-08 8:28
DeepToot24-Jul-08 8:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.