all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #6657: pveproxy: detect mobile firefox better
@ 2025-08-11 13:16 Dominik Csapak
  2025-08-11 13:18 ` Dominik Csapak
  2025-08-12  7:55 ` [pve-devel] applied: " Fiona Ebner
  0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2025-08-11 13:16 UTC (permalink / raw)
  To: pve-devel

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-12  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-11 13:16 [pve-devel] [PATCH manager] fix #6657: pveproxy: detect mobile firefox better Dominik Csapak
2025-08-11 13:18 ` Dominik Csapak
2025-08-12  7:55 ` [pve-devel] applied: " Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal