Colon in string with a space after it can lead to invalid param name
Author: MaerF0x0Created Feb 18, 2016Updated Jul 21, 2026
SELECT '1: profiles' as p FROM profilesWill result in an empty string name being inserted into the param name list.
This line should only run if we find a non-empty name: https://github.com/jmoiron/sqlx/blob/master/named.go#L264-L265
We're seeing errors:
"could not find name in map[string]interface {}(nil)"note the dbl space between "name" and "in" , its substituting an empty string in %s.
LMK if you'll take a PR for fixing.
Source: jmoiron/sqlx