[pve-devel] [PATCH manager] fix #6657: pveproxy: detect mobile firefox better
Dominik Csapak
d.csapak at proxmox.com
Mon Aug 11 15:16:00 CEST 2025
in mobile firefox, the text 'Mobile' is not followed by whitespace or a
forward slash, but rather a semicolon (';'). Instead of simply adding
that to the list of characters, change the regex to accept 'Mobile' only
when it's a word boundary, this should include
slashes/whitespace/semicolons and other things browser vendors might use
in their user agent strings.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/Service/pveproxy.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm
index 6ee4a141..c6011a00 100755
--- a/PVE/Service/pveproxy.pm
+++ b/PVE/Service/pveproxy.pm
@@ -185,7 +185,7 @@ sub is_phone {
return 1 if $ua =~ m/(iPhone|iPod|Windows Phone)/;
- if ($ua =~ m/Mobile(\/|\s)/) {
+ if ($ua =~ m/Mobile\b/) {
return 1 if $ua =~ m/(BlackBerry|BB)/;
return 1 if ($ua =~ m/(Android)/) && ($ua !~ m/(Silk)/);
}
--
2.39.5
More information about the pve-devel
mailing list