Fixed resource generation via uuid
This commit is contained in:
parent
55e50ad979
commit
6dd4456b11
@ -6,6 +6,7 @@
|
|||||||
See the file LICENSE for copying permission.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import uuid
|
||||||
import logging
|
import logging
|
||||||
import hashlib
|
import hashlib
|
||||||
import random
|
import random
|
||||||
@ -98,7 +99,7 @@ class XEP_0078(BasePlugin):
|
|||||||
# A resource is required, so create a random one if necessary
|
# A resource is required, so create a random one if necessary
|
||||||
resource = self.xmpp.requested_jid.resource
|
resource = self.xmpp.requested_jid.resource
|
||||||
if not resource:
|
if not resource:
|
||||||
resource = uuid.uuid4()
|
resource = str(uuid.uuid4())
|
||||||
|
|
||||||
iq['auth']['resource'] = resource
|
iq['auth']['resource'] = resource
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user