Giter VIP home page Giter VIP logo

Comments (15)

photovirus avatar photovirus commented on August 31, 2024

Update here: Mediawiker uses Package Control's SSL implementation, so it would seem that problem lies there (most likely, PC can't get certs from the Keychain). @tosher, can you confirm my suspicions?

Also, I get this problem both on OS X 10.10.5 and 10.11.2.

from mediawiker.

tosher avatar tosher commented on August 31, 2024

Yes, the plugin depends on ssl from package control.
Do you have the same problems as in

or only with Mediawiker?

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

Mediawiker only, and only with our corporate wiki.
I tried https with Wikipedia, everything is fine. Package Control itself works fine too.

It seems that Package Control doesn't trust our custom certificate despite I have added it to the Mac's Keychain and to ca-bundle.

from mediawiker.

tosher avatar tosher commented on August 31, 2024

I'm forgot about one thing, the plugin depends on PC's _ssl library loader only, and for Linux platform.
I think it's bug in my code (or bug or unsupported in mwclient library) and I'll research it.

If you know some public sites (based on mediawiki engine) with the same problem, tell me please :) It will be useful for testing.

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

I don't know such wikis but I can test a beta on our wiki. :] Just tell me the branch hash.

from mediawiker.

tosher avatar tosher commented on August 31, 2024

For self signed certificate we can disable verification of cert:
mwclient/client.py

after the string

self.connection = requests.Session()

add line

self.connection.verify = False

If this changes will help, i'll can to add this option to the plugin.

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

Sure, I'll test it next morning (around 11:00 UTC+4).

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

Tested, everything works (had to restart Sublime).

As far as I can tell, the new line disables cert verification altogether. I would suggest to do this only for self-signed certs (e. g. those that are stored in Package Control.user-ca-bundle or in the Keychain, something like that).

Thanks, anyway!

from mediawiker.

tosher avatar tosher commented on August 31, 2024

I'll make it as param in server settings with default value as True (verification is On).

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

That will be nice. Thank you.

from mediawiker.

tosher avatar tosher commented on August 31, 2024

Please, try the new version: 3.0.2
is_ssl_cert_verify - option for site configuration

"My wiki":
{
    "host": "en.wikisite.com",
    "https": true,
    "is_ssl_cert_verify": false,
    ...
}

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

Oops, something went wrong.

Traceback (most recent call last):
  File "/Users/yakovshapovalov/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwutils.py", line 256, in get_site
    sitecon = mwclient.Site(host=self.host, path=self.path, do_ssl_cert_verify=self.is_ssl_cert_verify)
TypeError: __init__() got an unexpected keyword argument 'do_ssl_cert_verify'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 550, in run_
    return self.run(edit, **args)
  File "/Users/yakovshapovalov/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 183, in run
    sitecon = mw.get_connect(password)
  File "/Users/yakovshapovalov/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwutils.py", line 130, in get_connect
    return mwcon.get_site(password)
  File "/Users/yakovshapovalov/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwutils.py", line 267, in get_site
    raise Exception('HTTP connection failed: %s' % e)
Exception: HTTP connection failed: __init__() got an unexpected keyword argument 'do_ssl_cert_verify'

from mediawiker.

tosher avatar tosher commented on August 31, 2024

Restart required

https://github.com/tosher/Mediawiker/blob/master/mwclient/client.py

def __init__(self, host, path='/w/', ext='.php', pool=None, retry_timeout=30,
                 max_retries=25, wait_callback=lambda *x: None, clients_useragent=None,
                 max_lag=3, compress=True, force_login=True, do_init=True, httpauth=None, do_ssl_cert_verify=True):

Parameter exists.

from mediawiker.

photovirus avatar photovirus commented on August 31, 2024

Oops, my bad. :)
All right, now it works fine.

Thanks for your fix! πŸ‘

from mediawiker.

tosher avatar tosher commented on August 31, 2024

Ок! Thanx for help with testing :)

from mediawiker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.