Can't install plugin from zip
Please first check if another issue has been opened for your problem
Versions
- OS: Windows 10 x64
- Gajim version: Gajim 1.1.2 32x
- GTK version: 3.24.5
- Python-nbxmpp version: 0.6.10
Steps to reproduce the problem
- Open Gajim
- Select "Plugins" from the menu and click "Install plugin from zip" button.
- Choose zipped image plugin (from here https://dev.gajim.org/gajim/gajim-plugins/tree/master/image)
Expected behavior
Plugin should be installed.
Actual behavior
"Archive is malformed" error. Same thing with other plugins.
May be, the problem is in this code: pluginmanager.py
for filename in zip_file.namelist():
if filename.startswith('.') or filename.startswith('/') or \
('/' not in filename):
# members not safe
raise PluginsystemError(_('Archive is malformed'))
if filename.endswith('/') and filename.find('/', 0, -1) < 0:
dirs.append(filename.strip('/'))
if 'manifest.ini' in filename.split('/')[1]:
manifest = True
if not manifest:
return
if len(dirs) > 1:
raise PluginsystemError(_('Archive is malformed'))
With this conditons (if filename.startswith('.') or filename.startswith('/') or ('/' not in filename):
) file in archive should not starts with '/' and should contain '/' , but it doesn't look possible...