aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Moench-Tegeder <cmt@FreeBSD.org>2023-03-24 21:23:18 +0000
committerChristoph Moench-Tegeder <cmt@FreeBSD.org>2023-03-24 21:29:11 +0000
commit376ed2486ab8224c6290e897f53c5360aa9fff92 (patch)
tree0a0381c23a8048cb326b9d3a19a35565c604b57c
parentdb1730c4226de58e88583392da048527ad5a02e3 (diff)
downloadports-376ed2486ab8224c6290e897f53c5360aa9fff92.tar.gz
ports-376ed2486ab8224c6290e897f53c5360aa9fff92.zip
www/firefox: Restore webauth/security key usage
patch from upstream authenticator-rs https://github.com/mozilla/authenticator-rs/pull/238 PR: 270092 Reported By: Thibault Payet (cherry picked from commit 388dd4e9e29324b86c19d656b5523013daa1837f)
-rw-r--r--www/firefox/Makefile2
-rw-r--r--www/firefox/files/patch-bug182406637
2 files changed, 38 insertions, 1 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 8e433bfecc11..0fe303d40352 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,6 +1,6 @@
PORTNAME= firefox
DISTVERSION= 111.0.1
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 2
CATEGORIES= www wayland
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
diff --git a/www/firefox/files/patch-bug1824066 b/www/firefox/files/patch-bug1824066
new file mode 100644
index 000000000000..cce34e9eb196
--- /dev/null
+++ b/www/firefox/files/patch-bug1824066
@@ -0,0 +1,37 @@
+commit c017c06d61545a86338a1cbc73967803c5a2a6bc
+Author: John M. Schanck <jschanck@mozilla.com>
+Date: Thu Mar 23 12:13:44 2023 -0700
+
+ Apply pr234 patch to transports/freebsd
+
+diff --git third_party/rust/authenticator/src/transport/freebsd/device.rs third_party/rust/authenticator/src/transport/freebsd/device.rs
+index 8f4de54..3a83be2 100644
+--- third_party/rust/authenticator/src/transport/freebsd/device.rs
++++ third_party/rust/authenticator/src/transport/freebsd/device.rs
+@@ -41,7 +41,9 @@ impl Device {
+ buf[6] = 0;
+ buf[7] = 1; // one byte
+
+- self.write_all(&buf)?;
++ if self.write(&buf)? != buf.len() {
++ return Err(io_err("write ping failed"));
++ }
+
+ // Wait for response
+ let mut pfd: libc::pollfd = unsafe { mem::zeroed() };
+@@ -56,8 +58,13 @@ impl Device {
+ continue;
+ }
+
+- // Read response
+- self.read_exact(&mut buf)?;
++ // Read response. When reports come in they are all
++ // exactly the same size, with no report id byte because
++ // there is only one report.
++ let n = self.read(&mut buf[1..])?;
++ if n != buf.len() - 1 {
++ return Err(io_err("read pong failed"));
++ }
+
+ return Ok(());
+ }