Merge pull request #9 from hybula/main

Move bugfix into production
This commit is contained in:
Tamer 2022-12-27 10:27:24 +01:00 committed by GitHub
commit 0c75a2da67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## 1.1.1 - 2022-12-27
### Fixed
- Fix IPv6 issues thanks to @kimma.
## 1.1.0 - 2022-11-23
### Fixed
- Changelog date format adjusted to ISO 8601.

View file

@ -167,7 +167,7 @@ class LookingGlass
*/
public static function ping(string $host, int $count = 4): bool
{
return self::procExecute('ping -c' . $count . ' -w15', $host);
return self::procExecute('ping -4 -c' . $count . ' -w15', $host);
}
/**

View file

@ -46,7 +46,7 @@ if (!empty($_POST)) {
}
if (in_array($_POST['backendMethod'], ['ping6', 'mtr6', 'traceroute6'])) {
if (!LookingGlass::isValidIpv6($_POST['targetHost']) ||
if (!LookingGlass::isValidIpv6($_POST['targetHost']) &&
!$targetHost = LookingGlass::isValidHost($_POST['targetHost'],LookingGlass::IPV6)
) {
exitErrorMessage('No valid IPv6 provided.');