public inbox for pve-devel@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

* Re: [pve-devel] [PATCH manager] fix #6657: pveproxy: detect mobile firefox better
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2025-08-11 13:18 UTC (permalink / raw)
  To: pve-devel

just to note, this would be an ideal candidate for regression tests.
also pmg has a slightly different method to check this, that we should
unify with this one.

I'll look into both more deeply in the coming days/weeks when I have 
time, but I wanted to create a fix for this first.


_______________________________________________
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

* [pve-devel] applied: [PATCH manager] fix #6657: pveproxy: detect mobile firefox better
  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 ` Fiona Ebner
  1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2025-08-12  7:55 UTC (permalink / raw)
  To: pve-devel, Dominik Csapak

On Mon, 11 Aug 2025 15:16:00 +0200, Dominik Csapak wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] fix #6657: pveproxy: detect mobile firefox better
      commit: 188ff556ccff8783ac3efa7698389e5b55957d9f


_______________________________________________
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal