Philipp Hörist pushed to branch master at gajim / gajim
Commits:
9322ed44 by Philipp Hörist at 2017-11-24T16:28:22+01:00
Show missing dbus message only on Linux
Mac and Windows dont have dbus available
- - - - -
1 changed file:
- gajim/common/dbus_support.py
Changes:
=====================================
gajim/common/dbus_support.py
=====================================
--- a/gajim/common/dbus_support.py
+++ b/gajim/common/dbus_support.py
@@ -24,7 +24,7 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
-import os
+import sys
import logging
from gajim.common import app
@@ -40,7 +40,7 @@ try:
DBusGMainLoop(set_as_default=True)
except ImportError:
supported = False
- if not os.name == 'nt': # only say that to non Windows users
+ if sys.platform == 'linux': # windows and mac have no dbus
print(_('D-Bus python bindings are missing in this computer'))
print(_('D-Bus capabilities of Gajim cannot be used'))
else:
@@ -51,7 +51,7 @@ else:
supported = True # does user have D-Bus bindings?
except dbus.DBusException:
supported = False
- if not os.name == 'nt': # only say that to non Windows users
+ if sys.platform == 'linux': # windows and mac have no dbus
print(_('D-Bus does not run correctly on this machine'))
print(_('D-Bus capabilities of Gajim cannot be used'))
except exceptions.SystemBusNotPresent:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/9322ed440594c02283b10f6c89c172eb17…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/9322ed440594c02283b10f6c89c172eb17…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
f97b799f by André Apitzsch at 2017-11-23T00:22:40+01:00
Fix invalid dev version string
- - - - -
359d327b by Philipp Hörist at 2017-11-24T15:58:34+01:00
Merge branch 'fix_version' into 'master'
Fix invalid dev version string
See merge request gajim/gajim!157
- - - - -
1 changed file:
- gajim/__init__.py
Changes:
=====================================
gajim/__init__.py
=====================================
--- a/gajim/__init__.py
+++ b/gajim/__init__.py
@@ -6,7 +6,7 @@ try:
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
stdout=subprocess.PIPE).communicate()[0]
if node:
- __version__ += '-' + node.decode('utf-8').strip()
+ __version__ += '+' + node.decode('utf-8').strip()
except Exception:
pass
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/8d43907b1e75f3bebb59a77cdc6da28f1…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/8d43907b1e75f3bebb59a77cdc6da28f1…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
42275cfb by André Apitzsch at 2017-11-22T22:11:36+01:00
Desktop files: add information for translators
- - - - -
8d43907b by Yann Leboulanger at 2017-11-22T22:51:09+01:00
Merge branch 'translators' into 'master'
Desktop files: add information for translators
See merge request gajim/gajim!156
- - - - -
2 changed files:
- data/gajim-remote.desktop.in
- data/org.gajim.Gajim.desktop.in
Changes:
=====================================
data/gajim-remote.desktop.in
=====================================
--- a/data/gajim-remote.desktop.in
+++ b/data/gajim-remote.desktop.in
@@ -1,6 +1,7 @@
[Desktop Entry]
Categories=Network;InstantMessaging;RemoteAccess;ConsoleOnly;
Name=Open URI using Gajim
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=chat;messaging;im;jabber;xmpp;bonjour;voip;
Version=1.0
Exec=gajim-remote handle_uri %u
=====================================
data/org.gajim.Gajim.desktop.in
=====================================
--- a/data/org.gajim.Gajim.desktop.in
+++ b/data/org.gajim.Gajim.desktop.in
@@ -3,9 +3,11 @@ Categories=Network;InstantMessaging;GTK;GNOME;
Name=Gajim
GenericName=Jabber IM Client
Comment=A GTK+ Jabber client
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=chat;messaging;im;xmpp;bonjour;voip;
Version=1.0
Exec=gajim
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gajim.Gajim
StartupNotify=true
StartupWMClass=Gajim
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/ae57d66a6bfdf339a2f661a805e3187de…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/ae57d66a6bfdf339a2f661a805e3187de…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / python-nbxmpp
Commits:
0b77b07b by Philipp Hörist at 2017-11-22T18:03:18+01:00
Use os.urandom for random numbers
- - - - -
ef78e16c by Yann Leboulanger at 2017-11-22T22:50:11+01:00
Merge branch 'master' into 'master'
Use os.urandom for random numbers
See merge request gajim/python-nbxmpp!9
- - - - -
3 changed files:
- nbxmpp/auth_nb.py
- nbxmpp/bosh.py
- − nbxmpp/rndg.py
Changes:
=====================================
nbxmpp/auth_nb.py
=====================================
--- a/nbxmpp/auth_nb.py
+++ b/nbxmpp/auth_nb.py
@@ -29,6 +29,8 @@ from .protocol import Node, NodeProcessed, isResultNode, Iq, Protocol, JID
from .plugin import PlugIn
import sys
import re
+import os
+import binascii
import base64
from . import dispatcher_nb
import hmac
@@ -37,8 +39,6 @@ import hashlib
import logging
log = logging.getLogger('nbxmpp.auth_nb')
-from . import rndg
-
def HH(some): return hashlib.md5(some).hexdigest()
def H(some): return hashlib.md5(some).digest()
def C(some): return b':'.join(some)
@@ -463,7 +463,7 @@ class SASL(PlugIn):
(isinstance(chal['qop'], list) and 'auth' in chal['qop'])):
self.resp = {'username': self.username,
'nonce': chal['nonce'],
- 'cnonce': '%x' % rndg.getrandbits(196),
+ 'cnonce': '%x' % int(binascii.hexlify(os.urandom(24)), 16),
'nc': ('00000001'), # ToDo: Is this a tupel or only a string?
'qop': 'auth',
'digest-uri': 'xmpp/' + self._owner.Server,
@@ -498,7 +498,7 @@ class SASL(PlugIn):
def set_password(self, password):
self.password = '' if password is None else password
if self.mechanism in ('SCRAM-SHA-1', 'SCRAM-SHA-1-PLUS'):
- self.client_nonce = '%x' % rndg.getrandbits(196)
+ self.client_nonce = '%x' % int(binascii.hexlify(os.urandom(24)), 16)
self.scram_soup = 'n=' + self.username + ',r=' + self.client_nonce
if self.mechanism == 'SCRAM-SHA-1':
if self.channel_binding is None:
=====================================
nbxmpp/bosh.py
=====================================
--- a/nbxmpp/bosh.py
+++ b/nbxmpp/bosh.py
@@ -17,7 +17,8 @@
## You should have received a copy of the GNU General Public License
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
+import os
+import binascii
import locale
from hashlib import sha1
from .transports_nb import NonBlockingTransport, NonBlockingHTTPBOSH,\
@@ -29,8 +30,6 @@ from .simplexml import Node
import logging
log = logging.getLogger('nbxmpp.bosh')
-from . import rndg
-
KEY_COUNT = 10
# Fake file descriptor - it's used for setting read_timeout in idlequeue for
@@ -486,11 +485,9 @@ class NonBlockingBOSH(NonBlockingTransport):
def get_rand_number():
- # with 50-bit random initial rid, session would have to go up
- # to 7881299347898368 messages to raise rid over 2**53
# (see http://www.xmpp.org/extensions/xep-0124.html#rids)
# it's also used for sequence key initialization
- return rndg.getrandbits(50)
+ return int(binascii.hexlify(os.urandom(6)), 16)
class AckChecker(object):
=====================================
nbxmpp/rndg.py deleted
=====================================
--- a/nbxmpp/rndg.py
+++ /dev/null
@@ -1,49 +0,0 @@
-## rndg.py
-##
-## cryptographically secure pseudo-random number generator.
-## When possible use OpenSSL PRNG combined with os.random,
-## if OpenSSL PRNG is not available, use only os.random.
-##
-## Copyright (C) 2013 Fedor Brunner <fedor.brunner(a)azet.sk>
-##
-## This file is part of Gajim.
-##
-## Gajim is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published
-## by the Free Software Foundation; version 3 only.
-##
-## Gajim is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
-USE_PYOPENSSL = False
-try:
- import OpenSSL.rand
- import binascii, os
- USE_PYOPENSSL = True
-except ImportError:
- import random
-
-if not USE_PYOPENSSL:
- getrandbits = random.SystemRandom().getrandbits
-else:
- def getrandbits(k):
- """getrandbits(k) -> x. Generates a long int with k random bits."""
- if k <= 0:
- raise ValueError('number of bits must be greater than zero')
- if k != int(k):
- raise TypeError('number of bits should be an integer')
-
- bytes = (k + 7) // 8 # bits / 8 and rounded up
-
- # Add system entropy to OpenSSL PRNG
- OpenSSL.rand.add(os.urandom(bytes), bytes)
- # Extract random bytes from OpenSSL PRNG
- random_str = OpenSSL.rand.bytes(bytes)
-
- x = int(binascii.hexlify(random_str), 16)
- return x >> (bytes * 8 - k) # trim excess bits
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/compare/6807867b231ed7e25fbdbac36…
---
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/compare/6807867b231ed7e25fbdbac36…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8e8eff79 by André Apitzsch at 2017-11-22T20:30:13+01:00
Create desktop and appdata files in build directory
- - - - -
ae57d66a by Philipp Hörist at 2017-11-22T21:25:27+01:00
Merge branch 'build_location' into 'master'
Create desktop and appdata files in build directory
See merge request gajim/gajim!155
- - - - -
1 changed file:
- setup.py
Changes:
=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -19,6 +19,7 @@ import gajim
pos = [x for x in os.listdir('po') if x[-3:] == ".po"]
ALL_LINGUAS = sorted([os.path.split(x)[-1][:-3] for x in pos])
cwd = os.path.dirname(os.path.realpath(__file__))
+build_dir = os.path.join(cwd, "build")
def update_trans():
@@ -56,7 +57,7 @@ def build_trans(build_cmd):
data_files = build_cmd.distribution.data_files
for lang in ALL_LINGUAS:
po_file = os.path.join('po', lang + '.po')
- mo_file = os.path.join(cwd, 'build', 'mo', lang, 'LC_MESSAGES', 'gajim.mo')
+ mo_file = os.path.join(build_dir, 'mo', lang, 'LC_MESSAGES', 'gajim.mo')
mo_dir = os.path.dirname(mo_file)
if not (os.path.isdir(mo_dir) or os.path.islink(mo_dir)):
os.makedirs(mo_dir)
@@ -84,7 +85,7 @@ def build_man(build_cmd):
data_files = build_cmd.distribution.data_files
for man in ['gajim.1', 'gajim-history-manager.1', 'gajim-remote.1']:
filename = os.path.join('data', man)
- newdir = os.path.join(cwd, 'build', 'man')
+ newdir = os.path.join(build_dir, 'man')
if not (os.path.isdir(newdir) or os.path.islink(newdir)):
os.makedirs(newdir)
@@ -112,7 +113,7 @@ def build_intl(build_cmd):
Merge translation files into desktop and mime files
'''
data_files = build_cmd.distribution.data_files
- base = cwd
+ base = build_dir
merge_files = (('data/org.gajim.Gajim.desktop', 'share/applications', '--desktop'),
('data/gajim-remote.desktop', 'share/applications', '--desktop'),
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/d86c7f47f5593ff3973be7e7f8327ff22…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/d86c7f47f5593ff3973be7e7f8327ff22…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch gajim_0.16 at gajim / gajim
Commits:
81bf435b by Yann Leboulanger at 2017-11-22T15:58:42+01:00
Fix showing normal message event
- - - - -
1 changed file:
- src/session.py
Changes:
=====================================
src/session.py
=====================================
--- a/src/session.py
+++ b/src/session.py
@@ -260,7 +260,7 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
self.conn.name, contact, self)
obj.show_in_systray = notify.get_show_in_systray(event_type,
self.conn.name, contact)
- if obj.mtype == 'normal' and not obj.popup:
+ if obj.mtype == 'normal' and obj.popup:
do_event = False
else:
do_event = True
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/81bf435b09ee70790e8aa5d7871ee87604…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/81bf435b09ee70790e8aa5d7871ee87604…
You're receiving this email because of your account on dev.gajim.org.