On Nov 8, 4:51 pm, Marc Wick <
m...@geonames.org> wrote:
> It is an html encoding and it will therefore display correctly on an
> html page.
But it shouldn't, unless the source data is supposed to be HTML
encoded - which it isn't.
Take for example geonameid 6619831, which is for the Victoria & Albert
Museum. Go to that page and view source and you'll see an error in the
HTML:
<meta name="description" content="Victoria & Albert Museum England
Kensington and Chelsea, United Kingdom, museum" />
This is a bug. The '&' should be & and you can see that the title
field is properly escaped:
<title>Victoria & Albert Museum, United Kingdom</title>
Potentially this opens the geonames server up to various sorts of well-
known attacks.
I tried to test this by adding a place named '"> testing' at the
stadium in Boden. That gives me the error message
error while saving:
Cannot parse ' country:SE names:" names:testing fcode:STDM( fc:S )':
Lexical error at line 1, column 54. Encountered: after : "\"
names:testing fcode:STDM( fc:S )"
That implies that special characters aren't properly being escaped
before doing into the database. If I use two double quotes, it worked,
that is
""> testing
I'm disconcerted about that. Perhaps there is also a possible
injection attack on the database? I also can't figure out where the
record went so I can delete it. (Or more properly, use the correct
name.) Please feel free to delete the record if it was created, or for
that matter wipe my account if this was too improper.
> All that needed to be done was to click on the edit link and save again.
> I did it for you.
Thanks. But that shouldn't have been the right solution if data
conversion is correctly done all the way through, which is why I
didn't consider doing it.
-- Andrew Dalke <
da...@dalkescientific.com>