[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1054466: marked as done (bookworm-pu: package localslackirc/1.17-1.1)



Your message dated Sat, 10 Feb 2024 13:11:19 +0000
with message-id <E1rYn8Z-002yYQ-LL@coccia.debian.org>
and subject line Released with 12.5
has caused the Debian Bug report #1054466,
regarding bookworm-pu: package localslackirc/1.17-1.1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1054466: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054466
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: localslackirc@packages.debian.org, tiposchi@tiscali.it
Control: affects -1 + src:localslackirc

Slack now requires some headers to connect to the websocket, that were not
needed before.

This patch is to backport the sending of those headers, so that localslackirc
can connect to it.

[ Reason ]

I am backporting this so that localslackirc can be used by users on stable.

It is caused by slack doing changes on what they accept.

[ Impact ]

localslackirc is currently useless for most users on stable. Without
the fix it will remain useless.

[ Tests ]

I tried manually, there is no automated tests for this, since the slack
server is not open source.

[ Risks ]

The patch is fairly simple, I ran the code, I ran mypy for safety and all
seemed ok.

[ Checklist ]
  [*] *all* changes are documented in the d/changelog
  [*] I reviewed all changes and I approve them
  [*] attach debdiff against the package in (old)stable
  [*] the issue is verified as fixed in unstable

[ Changes ]

Send http headers to websocket connection.

[ Other info ]

There is no debian bug tracking this, because I just noticed the issue myself
and immediately fixed it upstream.

But I think it's worthy to backport it.
diff -Nru localslackirc-1.17/debian/changelog localslackirc-1.17/debian/changelog
--- localslackirc-1.17/debian/changelog	2022-10-15 12:17:10.000000000 +0200
+++ localslackirc-1.17/debian/changelog	2023-10-24 10:09:34.000000000 +0200
@@ -1,3 +1,9 @@
+localslackirc (1.17-1.1+deb12u1) bookworm; urgency=medium
+
+  * Backport patch to send authorization and cookie headers to the websocket
+
+ -- Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>  Tue, 24 Oct 2023 10:09:34 +0200
+
 localslackirc (1.17-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru localslackirc-1.17/debian/patches/authenticate_websocket.patch localslackirc-1.17/debian/patches/authenticate_websocket.patch
--- localslackirc-1.17/debian/patches/authenticate_websocket.patch	1970-01-01 01:00:00.000000000 +0100
+++ localslackirc-1.17/debian/patches/authenticate_websocket.patch	2023-10-24 10:09:34.000000000 +0200
@@ -0,0 +1,33 @@
+Description: Send token and cookie when connecting to the websocket as well
+ Now slack is requiring those headers to be set on the websocket as well.
+ .
+ They used to be needed just on the normal REST API calls.
+ .
+ The patch is a backport from upstream.
+ .
+ localslackirc (1.17-1.1+deb12u1) bookworm; urgency=medium
+ .
+   * Backport patch to send authorization and cookie headers to the websocket
+Author: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
+Origin: upstream
+Forwarded: not-needed
+Applied-Upstream: 1.19, https://github.com/ltworf/localslackirc/pull/426/commits/6a7eafb6d33b997ed61331e4f26264e6d4ddf66c
+Last-Update: 2023-10-24
+
+--- localslackirc-1.17.orig/slackclient/client.py
++++ localslackirc-1.17/slackclient/client.py
+@@ -124,7 +124,13 @@ class SlackClient:
+             timeout: in seconds
+         """
+         r = await self.login()
+-        self._websocket = await wsconnect(r.url, close_timeout=0.2)
++        headers = {
++            'user-agent': 'localslackirc',
++            'Authorization': f'Bearer {self._token}',
++        }
++        if self._cookie:
++            headers['cookie'] = self._cookie
++        self._websocket = await wsconnect(r.url, close_timeout=0.2, extra_headers=headers)
+         return r
+ 
+ 
diff -Nru localslackirc-1.17/debian/patches/series localslackirc-1.17/debian/patches/series
--- localslackirc-1.17/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ localslackirc-1.17/debian/patches/series	2023-10-24 10:09:34.000000000 +0200
@@ -0,0 +1 @@
+authenticate_websocket.patch

--- End Message ---
--- Begin Message ---
Version: 12.5

The upload requested in this bug has been released as part of 12.5.

--- End Message ---

Reply to: