• support[@]kurinchilion.com
  • +1 (888) 666-4252

Blog

SQL Injection: Whitelist validation vs. blacklist validation

Sep 09, 2012 - by kurinchilamp /MySql/ 369 Views
Whitelist validation refers to data validation techniques such as checking the data type, data length, input range, nature of data by its format (for e.g. phone number will be ten digits separated by hyphens satisfying the format nnn-nnn-nnnn). Regular expressions may be used for format validation in inputs. Blacklist validation refers to rejecting data based on a know bad list filter. This is not a powerful solution as the list of possible exclusions will be many and it is difficult to implement all possible scenarios. Blacklist validation should be used in conjunction with whitelist validation but in cases where whitelist validation cannot be applied at least blacklist validation should be implemented.
Continue Reading

SQL Injection: Database Code Security in Programming

Sep 08, 2012 - by kurinchilamp /MySql/ 366 Views
Dynamic SQL (concatenated sql string) is a coding practice where by the queries are built in the program and sent to SQL Server for execution. This can allow the code to be injected into the dynamic queries causing a damage to the database. A good alternative is to use parameterised queries where placeholders are set for the variables. The possibility of queries getting infected with injected code is completely removed with parameterized queries. In addition to parameterized queries, it is alway a best practice to sanitize the input parameters before using them in queries. Also the data input should be encoded appropriately especially in case of dynamic sql usage and to apply appropriate encoding when extracted from the database to avoid cross-site script execution.
Continue Reading

MySQL: ‘Access denied for user ‘root’@’localhost’ (using password: YES)’

Sep 18, 2011 - by kurinchilamp /MySql/ 342 Views
The above error message most likely occurs when users change password in one environment (via command line or phpmyadmin) and do not see the changes reflect in other OR if they have forgotten the password that is being set for the environment in question. Following command should help you set/change MySQL password $ mysql -u root -p (more…)
Continue Reading

MySQL: How to stop, start or restart mysql?

Aug 10, 2011 - by kurinchilamp /MySql/ 273 Views
In linux, following commands are used to start/stop/restart mysql $/etc/init.d/mysqld start $/etc/init.d/mysqld restart $/etc/init.d/mysqld stop In windows, mysql runs as a service. C:> net stop mysql C:> net start mysql
Continue Reading

Linux: Case sensitive MySQL table names

Jul 20, 2011 - by kurinchilamp /MySql/ 404 Views
When transitioning MySQL database from Windows to Linux, users often encounter issues related to case-sensitiveness. Windows is case-insensitive and Linux is case-sensitive. In such scenarios when a database call is made after the application migration happens, users often run into errors which can send them in circles between the migration servers. Solution to this problem is to add a single line of text under my.cnf (MySQL configuration file) under [mysqld] (more…)
Continue Reading

MySQL: Default collation latin1_swedish_ci (swedish case insensitive)

Mar 26, 2011 - by kurinchilamp /MySql/ 408 Views
When new fileds are created as variable characters they get stored as latin1_swedish_ci as default. To change the default collation users will have to manually select the collation of their choice from the mysql admin interface such as in the case of phpmyadmin or will have to denote it in sql queries. To make a specific collation as the default, other option to give mysql an indication of it by having the needed collation name in my.cnf (mysql configuration) as shown below Edit my.cnf: [mysqld] collation_server=latin1_general_ci (more…)
Continue Reading

TECHNOLOGY DEV STACK

Following are some of the technologies that we use to build and maintain solutions for our clients.