opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
327 stars 75 forks source link

Input validation in bulk edit (newlines, invalid characters, more special chars) #269

Closed hakong closed 10 years ago

hakong commented 10 years ago

In bulk edit, I renamed a service_description by pasting the new value in, and didn't know that what I had just copied were in fact 2 lines with some more text, as a result, the config now contains:

    service_description           SSL Certificate Expiration (PVE Proxy)
    SSL Certificate Expiration (PVE Proxy)SSL Certificate Expiration - PVE Proxy

So maybe do some input validation in bulk edit, possibly more places?

palli commented 10 years ago

We should file this under pynag.

palli commented 10 years ago

https://github.com/pynag/pynag

palli commented 10 years ago

I have no idea what browser allows you to paste newlines into a regular input field, but i changed pynag/pynag@560b3d0466ea86befcdefdddd5d1f3a88ba5c3d9 so it will raise errors if you try to push newline in as attribute values.

Since i cannot reproduce it, some testing feedback would be appreciated.