diff options
| author | Christoph Moench-Tegeder <cmt@FreeBSD.org> | 2023-03-24 21:23:18 +0000 |
|---|---|---|
| committer | Christoph Moench-Tegeder <cmt@FreeBSD.org> | 2023-03-24 21:23:18 +0000 |
| commit | 388dd4e9e29324b86c19d656b5523013daa1837f (patch) | |
| tree | 87ca3f53390de93e882945144311c8ac295cb9ba | |
| parent | d6c13d59929744da25d425821e8f5dd1b2343987 (diff) | |
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
| -rw-r--r-- | www/firefox/Makefile | 2 | ||||
| -rw-r--r-- | www/firefox/files/patch-bug1824066 | 37 |
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(()); + } |
