Add possibility to disable FAST.

v0.11
Martin Dosch 4 weeks ago
parent c21991c545
commit 95a2f672cf
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

@ -6,6 +6,7 @@
### Added
- Add new parameter `--subject`.
- Added flag `--fast-off` to disable XEP-0484: Fast Authentication Streamlining Tokens (requires go-xmpp > 0.2.0).
## [v0.10.0] 2024-04-13
### Changed

@ -75,10 +75,11 @@ If no configuration file is present or if the values should be overridden it is
the account details via command line options:
```plain
Usage: go-sendxmpp [-cdilnt] [-a value] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value] [--oob-file value] [--ox] [--ox-delete-nodes] [--ox-genprivkey-rsa] [--ox-genprivkey-x25519] [--ox-import-privkey value] [--ox-passphrase value] [-p value] [--raw] [--scram-mech-pinning value] [--ssdp-off] [-s value] [--timeout value] [--tls-version value] [-u value] [--version] [recipients…]
Usage: go-sendxmpp [-cdilnt] [-a value] [--fast-off] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value] [--oob-file value] [--ox] [--ox-delete-nodes] [--ox-genprivkey-rsa] [--ox-genprivkey-x25519] [--ox-import-privkey value] [--ox-passphrase value] [-p value] [--raw] [--scram-mech-pinning value] [--ssdp-off] [-s value] [--timeout value] [--tls-version value] [-u value] [--version] [recipients…]
-a, --alias=value Set alias/nicknamefor chatrooms.
-c, --chatroom Send message to a chatroom.
-d, --debug Show debugging info.
--fast-off Disable XEP-0484: Fast Authentication Streamlining Tokens.
-f, --file=value Set configuration file. (Default:
~/.config/go-sendxmpp/sendxmpprc)
--headline Send message as type headline.

@ -137,6 +137,7 @@ func main() {
flagSCRAMPinning := getopt.StringLong("scram-mech-pinning", 0, "", "Enforce the use of a certain SCRAM authentication mechanism.")
flagSSDPOff := getopt.BoolLong("ssdp-off", 0, "Disable XEP-0474: SASL SCRAM Downgrade Protection.")
flagSubject := getopt.StringLong("subject", 's', "", "Set message subject.")
flagFastOff := getopt.BoolLong("fast-off", 0, "Disable XEP-0484: Fast Authentication Streamlining Tokens.")
// Parse command line flags.
getopt.Parse()
@ -271,11 +272,13 @@ func main() {
fmt.Println(err)
}
fast, _ = getFastData(user, password)
// Reset FAST token and mechanism if expired.
if time.Now().After(fast.Expiry) {
fast.Token = ""
fast.Mechanism = ""
if !*flagFastOff {
fast, _ = getFastData(user, password)
// Reset FAST token and mechanism if expired.
if time.Now().After(fast.Expiry) {
fast.Token = ""
fast.Mechanism = ""
}
}
// Use ALPN
@ -321,7 +324,7 @@ func main() {
SSDP: !*flagSSDPOff,
UserAgentSW: resource,
UserAgentID: clientID,
Fast: true,
Fast: !*flagFastOff,
FastToken: fast.Token,
FastMechanism: fast.Mechanism,
}

@ -4,7 +4,7 @@
.SH "NAME"
\fBgo\-sendxmpp\fR \- A tool to send messages to an XMPP contact or MUC\.
.SH "SYNOPSIS"
\fBgo\-sendxmpp [\-cdilnt] [\-a value] [\-f value] [\-\-headline] [\-\-help] [\-h value] [\-j value] [\-m value] [\-\-muc\-password value] [\-\-oob\-file value] [\-\-ox] [\-\-ox\-delete\-nodes] [\-\-ox\-genprivkey\-rsa] [\-\-ox\-genprivkey\-x25519] [\-\-ox\-import\-privkey value] [\-\-ox\-passphrase value] [\-p value] [\-\-raw] [\-\-scram\-mech\-pinning value] [\-\-ssdp\-off] [\-s value] [\-\-timeout value] [\-\-tls\-version value] [\-u value] [\-\-version] [recipients…]\fR
\fBgo\-sendxmpp [\-cdilnt] [\-a value] [\-\-fast\-off] [\-f value] [\-\-headline] [\-\-help] [\-h value] [\-j value] [\-m value] [\-\-muc\-password value] [\-\-oob\-file value] [\-\-ox] [\-\-ox\-delete\-nodes] [\-\-ox\-genprivkey\-rsa] [\-\-ox\-genprivkey\-x25519] [\-\-ox\-import\-privkey value] [\-\-ox\-passphrase value] [\-p value] [\-\-raw] [\-\-scram\-mech\-pinning value] [\-\-ssdp\-off] [\-s value] [\-\-timeout value] [\-\-tls\-version value] [\-u value] [\-\-version] [recipients…]\fR
.SH "DESCRIPTION"
A tool to send messages to an XMPP contact or MUC inspired by \fBsendxmpp\fR\.
.br
@ -20,6 +20,9 @@ Send message to a chatroom\.
\fB\-d\fR, \fB\-\-debug\fR
Show debugging info\.
.TP
\fB\-\-fast\-off\fR
Disable XEP\-0484: Fast Authentication Streamlining Tokens\.
.TP
\fB\-f\fR, \fB\-\-file\fR=[\fIvalue\fR]
Set configuration file\. (Default: ~/\.config/go\-sendxmpp/config)
.TP

@ -81,7 +81,7 @@
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p><code>go-sendxmpp [-cdilnt] [-a value] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value]
<p><code>go-sendxmpp [-cdilnt] [-a value] [--fast-off] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value]
[--oob-file value] [--ox] [--ox-delete-nodes] [--ox-genprivkey-rsa] [--ox-genprivkey-x25519] [--ox-import-privkey value]
[--ox-passphrase value] [-p value] [--raw] [--scram-mech-pinning value] [--ssdp-off] [-s value] [--timeout value]
[--tls-version value] [-u value] [--version] [recipients…]</code></p>
@ -108,6 +108,8 @@ file location is specified with <code>-f</code> or <code>--file</code>.</p>
<code>-d</code>, <code>--debug</code>
</dt>
<dd>Show debugging info.</dd>
<dt><code>--fast-off</code></dt>
<dd>Disable XEP-0484: Fast Authentication Streamlining Tokens.</dd>
<dt>
<code>-f</code>, <code>--file</code>=[<var>value</var>]</dt>
<dd>Set configuration file. (Default: ~/.config/go-sendxmpp/config)</dd>

@ -3,7 +3,7 @@ go-sendxmpp(1) -- A tool to send messages to an XMPP contact or MUC.
## SYNOPSIS
`go-sendxmpp [-cdilnt] [-a value] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value]
`go-sendxmpp [-cdilnt] [-a value] [--fast-off] [-f value] [--headline] [--help] [-h value] [-j value] [-m value] [--muc-password value]
[--oob-file value] [--ox] [--ox-delete-nodes] [--ox-genprivkey-rsa] [--ox-genprivkey-x25519] [--ox-import-privkey value]
[--ox-passphrase value] [-p value] [--raw] [--scram-mech-pinning value] [--ssdp-off] [-s value] [--timeout value]
[--tls-version value] [-u value] [--version] [recipients…]`
@ -28,6 +28,9 @@ Send message to a chatroom.
* `-d`, `--debug`:
Show debugging info.
* `--fast-off`:
Disable XEP-0484: Fast Authentication Streamlining Tokens.
* `-f`, `--file`=[<value>]:
Set configuration file. (Default: ~/.config/go-sendxmpp/config)

Loading…
Cancel
Save