473,386 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Testing MySQL and preventing string from crashing it.

Hi,

I read somewhere that there are some tricks that a hacker can use to break
into the db table.
But how can i test against that? Is there a function to convert all strings
to 'safe' strings?

Can errors occur with integers or string only?

My main worry is for legitimate users that wish to save something that might
cause an error.

Can apostrophes, (" and ' ), cause errors? can a user wanting to save a
legitimate SQL query highjack my queries?

Your input will be greatly appreciated.
Many thanks

Sim
Jul 17 '05 #1
1 1566
Sims wrote:
Hi,

I read somewhere that there are some tricks that a hacker can use to break
into the db table.
But how can i test against that? Is there a function to convert all strings
to 'safe' strings?

Can errors occur with integers or string only?

My main worry is for legitimate users that wish to save something that might
cause an error.

Can apostrophes, (" and ' ), cause errors? can a user wanting to save a
legitimate SQL query highjack my queries?

Your input will be greatly appreciated.
Many thanks

Sim


One of the methods you can use is escaping the string

MySQL:
http://uk2.php.net/manual/en/functio...ape-string.php

PostgreSQL
http://uk2.php.net/manual/en/functio...ape-string.php

but it's always advisable to do extra validation along with this

~Cameron
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Henry Hank | last post by:
Environment: I'm setting up a database server on a Dell Poweredge 2650, dual 1.8GHZ pentium with 1GB of memory and RAID5 drives. I've installed RedHat 9, and updated the kernel to 2.4.20-19.9smp....
0
by: Matt Weakly | last post by:
Greetings: My MySQL (4.1.0 alpha) server crashes while processing large queries from a web page (using ColdFusion 5.0): ODBC Error Code = S1000 (General error) Lost connection to MySQL server...
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
2
by: pratchaya | last post by:
This is my sample error in my MySQL Log New value of fp=(nil) failed sanity check, terminating stack trace! Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions...
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
72
by: Jacob | last post by:
I have compiled a set og unit testing recommendations based on my own experience on the concept. Feedback and suggestions for improvements are appreciated: ...
1
by: jonefer | last post by:
What is the best mechanism/ convention for preventing stacked datagrids from overlapping each other? I'd like to do something similar to a "can shrink/can grow" in an Access report for an aspx...
9
by: davek | last post by:
(posted to: php.general, comp.lang.php, alt.php, alt.php.sql) I have a form where registered users on my site can edit their login details. For some reason, the script is inserting an extraneous...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.