Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xmpp-dns for openSUSE:Factory 
checked in at 2023-11-13 22:18:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xmpp-dns (Old)
 and      /work/SRC/openSUSE:Factory/.xmpp-dns.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xmpp-dns"

Mon Nov 13 22:18:51 2023 rev:9 rq:1125121 version:0.3.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/xmpp-dns/xmpp-dns.changes        2023-08-23 
14:59:44.066217571 +0200
+++ /work/SRC/openSUSE:Factory/.xmpp-dns.new.17445/xmpp-dns.changes     
2023-11-13 22:21:30.948927515 +0100
@@ -1,0 +2,7 @@
+Fri Nov 10 19:29:21 UTC 2023 - Michael Vetter <mvet...@suse.com>
+
+- Update to 0.3.9:
+  * Also apply timeout when server doesn't reply to StartTLS
+    initialisation.
+
+-------------------------------------------------------------------

Old:
----
  xmpp-dns-0.3.8.tar.gz

New:
----
  xmpp-dns-0.3.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xmpp-dns.spec ++++++
--- /var/tmp/diff_new_pack.NLAUFb/_old  2023-11-13 22:21:31.476946956 +0100
+++ /var/tmp/diff_new_pack.NLAUFb/_new  2023-11-13 22:21:31.476946956 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           xmpp-dns
-Version:        0.3.8
+Version:        0.3.9
 Release:        0
 Summary:        A CLI tool to check XMPP SRV records
 License:        BSD-2-Clause

++++++ _service ++++++
--- /var/tmp/diff_new_pack.NLAUFb/_old  2023-11-13 22:21:31.504947987 +0100
+++ /var/tmp/diff_new_pack.NLAUFb/_new  2023-11-13 22:21:31.508948135 +0100
@@ -3,7 +3,7 @@
     <param name="url">https://salsa.debian.org/mdosch/xmpp-dns.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="revision">v0.3.8</param>
+    <param name="revision">v0.3.9</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="changesgenerate">disable</param>
     <param name="versionrewrite-pattern">v(.*)</param>

++++++ vendor.tar.gz ++++++

++++++ xmpp-dns-0.3.8.tar.gz -> xmpp-dns-0.3.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.8/CHANGELOG.md 
new/xmpp-dns-0.3.9/CHANGELOG.md
--- old/xmpp-dns-0.3.8/CHANGELOG.md     2023-08-22 20:16:10.000000000 +0200
+++ new/xmpp-dns-0.3.9/CHANGELOG.md     2023-11-09 19:15:41.000000000 +0100
@@ -1,5 +1,9 @@
 # Changelog
 
+## [0.3.9] 2023-11-09
+### Changed
+- Also apply timeout when server doesn't reply to StartTLS initialisation.
+
 ## [0.3.8] 2023-08-22
 ### Changed
 - Don't look up IPs and don't try to connect if the SRV records target is ".".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.8/README.md new/xmpp-dns-0.3.9/README.md
--- old/xmpp-dns-0.3.8/README.md        2023-08-22 20:16:10.000000000 +0200
+++ new/xmpp-dns-0.3.9/README.md        2023-11-09 19:15:41.000000000 +0100
@@ -26,6 +26,12 @@
 go install salsa.debian.org/mdosch/xmpp-dns@latest
 ```
 
+Current development version:
+
+```
+go install salsa.debian.org/mdosch/xmpp-dns@master
+```
+
 The binary will be in your `$GOBIN` (usually
 `~/go/bin/`).
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xmpp-dns-0.3.8/main.go new/xmpp-dns-0.3.9/main.go
--- old/xmpp-dns-0.3.8/main.go  2023-08-22 20:16:10.000000000 +0200
+++ new/xmpp-dns-0.3.9/main.go  2023-11-09 19:15:41.000000000 +0100
@@ -21,7 +21,7 @@
 )
 
 const (
-       version = "0.3.8"
+       version = "0.3.9"
 )
 
 // Created with https://github.com/miku/zek
@@ -336,23 +336,45 @@
                fmt.Println(err)
                return
        }
-       buf := make([]byte, 4096)
-       _, err = c.Read(buf)
-       if err != nil {
-               fmt.Println("StartTLS:", statusNOK)
-               if err.Error() == "EOF" {
-                       // TODO: Properly check for all possible server errors
-                       // instead of only checking for "policy-violation".
-                       err = xml.Unmarshal(buf, &serverStreamError)
-                       if err == nil {
-                               fmt.Println("Server sent policy-violation:",
-                                       serverStreamError.Error.Text.Text)
-                       } else {
-                               fmt.Println("Server sent EOF.")
+       var buf []byte
+       bufChan := make(chan []byte)
+       ctx, cancel := context.WithCancel(context.Background())
+       defer cancel()
+       go func() {
+               buf := make([]byte, 4096)
+               _, err = c.Read(buf)
+               if err != nil {
+                       select {
+                       case <-ctx.Done():
+                               return
+                       default:
+                               fmt.Println("StartTLS:", statusNOK)
+                               if err.Error() == "EOF" {
+                                       // TODO: Properly check for all 
possible server errors
+                                       // instead of only checking for 
"policy-violation".
+                                       err = xml.Unmarshal(buf, 
&serverStreamError)
+                                       if err == nil {
+                                               fmt.Println("Server sent 
policy-violation:",
+                                                       
serverStreamError.Error.Text.Text)
+                                       } else {
+                                               fmt.Println("Server sent EOF.")
+                                       }
+                               } else {
+                                       fmt.Println(err)
+                               }
                        }
                } else {
-                       fmt.Println(err)
+                       bufChan <- buf
                }
+       }()
+       select {
+       case buf = <-bufChan:
+       case <-time.After(timeout):
+       }
+       if buf == nil {
+               fmt.Println("StartTLS:", statusNOK)
+               fmt.Println("Timeout while waiting for server reply.")
+               cancel()
                return
        }
        _ = xml.Unmarshal(buf, &serverFailure)
@@ -394,10 +416,9 @@
                }
        }
        d := tls.Client(c, tlsConfig)
-       ctx := context.Background()
-       ctx, cancel := context.WithTimeout(ctx, timeout)
-       defer cancel()
-       err = d.HandshakeContext(ctx)
+       ctx2, cancel2 := context.WithTimeout(context.Background(), timeout)
+       defer cancel2()
+       err = d.HandshakeContext(ctx2)
        if err != nil {
                switch err.Error() {
                case "EOF":

Reply via email to