owncloud / files_antivirus

:space_invader: virus scanner for ownCloud
GNU Affero General Public License v3.0
48 stars 30 forks source link

Fix hostname input validation #540

Closed prsnbrg closed 1 year ago

prsnbrg commented 1 year ago

Fix #523

Tested with different strings:

phil-davis commented 1 year ago

Other wacky things:

This works for me - I can't find anything wrong so far.

It seems a bit annoying that we have to write a long regex for this sort of thing. But that seems to be the "way it is done" in HTML.

phil-davis commented 1 year ago

Note: we cannot enter an IPv6 address like 2001:0db8:85a3:0000:0000:8a2e:0370:7334 But that was not possible before this PR either. IPv6 addresses have colons in them (and there are multiple formats that they can be written in. So that is a separate thing, if someone needs to input a literal IPv6 address. (usually I would expect a "normal" hostname that then might lookup in DNS an turn out to be IPv6 to reach that hostname)

phil-davis commented 1 year ago

@jnweiger please review and merge if you are happy with this.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication