Intevation / intelmq-fody

Web interface to IntelMQ
9 stars 3 forks source link

On searches leading and trailing whitespace should be stripped #48

Closed swilde closed 7 years ago

swilde commented 7 years ago

When searching e.g. for a CIDR the search for "203.0.113.0/24 " will currently not find the organization responsible for 203.0.113.0/24, due to the trailing white space. As such additionally whit space is easily introduced by sloppy c&p and hard to detect for the human user it should be ignored by the search.

dmth commented 7 years ago

Working on It right now (EDIT: No I'm not. See https://github.com/Intevation/intelmq-fody/issues/48#issuecomment-296676763). It's a Backend Problem.

bernhardreiter commented 7 years ago

Working on It right now. It's a Backend Problem.

I'd fix it in the frontend, just strip the spaces.

dmth commented 7 years ago

arg! I commented on the wrong problem. I meant to work on the search of specific IPs

dmth commented 7 years ago

I'd fix it in the frontend, just strip the spaces.

Shouldn't the backend also make sure of this?

bernhardreiter commented 7 years ago

Searching for a name with leading or trailing spaces could be on purpose, this is why I believe it is a frontend thing.

dmth commented 7 years ago

Searching for a name with leading or trailing spaces could be on purpose, this is why I believe it is a frontend thing.

If you do this on purpose, the Frontend should also not strip those characters.

bernhardreiter commented 7 years ago

The frontend can decide.

bernhardreiter commented 7 years ago

@dmth after considering it, I agree that you are right: for this kind of search leading and trailing whitespace does not make sense, so making the backend robust is better.

dmth commented 7 years ago

@bernhardreiter This issue is closed, did you also enhance the backend?

bernhardreiter commented 7 years ago

@dmth Yes I've fixed the backend, as can be seen in the closing note above where the commit with the fix in the backend is given.

dmth commented 7 years ago

Thanks