Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to manually initiate SASL #1552

Closed
wants to merge 2 commits into from
Closed

Conversation

glguy
Copy link
Contributor

@glguy glguy commented Sep 3, 2023

No description provided.

@jlu5 jlu5 changed the base branch from master to testing September 3, 2023 04:09
Copy link
Owner

@progval progval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

plugins/Admin/plugin.py Outdated Show resolved Hide resolved
plugins/Admin/plugin.py Outdated Show resolved Hide resolved
src/irclib.py Outdated Show resolved Hide resolved
src/irclib.py Show resolved Hide resolved
Copy link
Owner

@progval progval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing

plugins/Network/plugin.py Outdated Show resolved Hide resolved
@progval progval marked this pull request as ready for review September 3, 2023 18:53
@progval
Copy link
Owner

progval commented Sep 3, 2023

Could you rewrite your history to have the test changes first, then squash the rest together? This will make history easier to read and bisect

@progval
Copy link
Owner

progval commented Sep 5, 2023

diff --git a/test/test_irclib.py b/test/test_irclib.py
index 18f60b53d..2f79b2f34 100644
--- a/test/test_irclib.py
+++ b/test/test_irclib.py
@@ -1494,12 +1494,16 @@ def testBatchInterleaved(self):
 
 class SaslTestCase(SupyTestCase, CapNegMixin):
     def setUp(self):
-        pass
+        self._default_mechanisms = conf.supybot.networks.test.sasl.mechanisms()
+
+    def tearDown(self):
+        conf.supybot.networks.test.sasl.mechanisms.setValue(self._default_mechanisms)
 
     def testPlain(self):
         try:
             conf.supybot.networks.test.sasl.username.setValue('jilles')
             conf.supybot.networks.test.sasl.password.setValue('sesame')
+            conf.supybot.networks.test.sasl.mechanisms.setValue(['external', 'plain'])
             self.irc = irclib.Irc('test')
 
             self.startCapNegociation()
@@ -1526,11 +1530,11 @@ def testExternalFallbackToPlain(self):
         try:
             conf.supybot.networks.test.sasl.username.setValue('jilles')
             conf.supybot.networks.test.sasl.password.setValue('sesame')
+            conf.supybot.networks.test.sasl.mechanisms.setValue(['external', 'plain'])
             conf.supybot.networks.test.certfile.setValue('foo')
             self.irc = irclib.Irc('test')
 
             self.assertEqual(self.irc.sasl_current_mechanism, None)
-            self.irc.sasl_next_mechanisms = ['external', 'plain']
 
             self.startCapNegociation()

works for me after this patch

@progval
Copy link
Owner

progval commented Sep 5, 2023

Merged in 9e82e3f. Thanks again

@progval progval closed this Sep 5, 2023
@glguy glguy deleted the manual-sasl branch September 5, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants