Git Product home page Git Product logo

django-sslserver's People

Contributors

ahivert avatar ajsierakowski avatar allandaemon avatar boydjj avatar cmpitg avatar collinanderson avatar jaschilz avatar jasonm avatar joehybird avatar johnthagen avatar justinabrahms avatar keturn avatar morganead avatar myrs avatar psachin avatar rfleschenberg avatar robdennis avatar shalltell avatar steve-gregory avatar teddziuba avatar titusz avatar zulupro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-sslserver's Issues

No --nostatic option

The code in get_handler() checks for the 'use_static_handler' option but as far as I can tell there's no way to turn it off. The runserver command from django.contrib.staticfiles has the --nostatic option, but I don't see a way to set that for the runsslserver command.

Integrate with caddy

Is it possible to integrate django-sslserver with caddy. I Don't even know how you would go about it. But it looks cool

Documentation: clarify use of other static file handlers

With #21, the default behavior if staticfiles is installed is to use django.contrib.staticfiles.handlers.StaticFilesHandler. This can cause unexpected 404s -- e.g., when using runsslserver in conjunction with WhiteNoise. The documentation should clarify that in these cases it makes sense to include the --nostatic flag. Happy to submit a PR if it would be useful.

multithreading support?

It seems that there is a major difference between django's native "runserver" and this "runsslserver" other than SSL that, "runsslserver" is single threaded.
Is it possible to make it support multithreading? just like runserver?

AttributeError: type object 'Command' has no attribute 'option_list'

When I run ./manage.py runsslserver 0.0.0.0:8000 on Django 1.11.8 I get the error

...
  File "/home/joren/Workspace/bootbootboot/lib/python3.5/site-packages/sslserver/management/commands/runsslserver.py", line 48, in <module>
    class Command(runserver.Command):
  File "/home/joren/Workspace/bootbootboot/lib/python3.5/site-packages/sslserver/management/commands/runsslserver.py", line 49, in Command
    option_list = runserver.Command.option_list + (
AttributeError: type object 'Command' has no attribute 'option_list'

multiple values for argument 'addport'

Hello,

I have setup django-sslserver in my virutalenv. I already have django app that works well when i run
python manage.py runserver 0.0.0.0:8000 in my ubuntu 12.X

but when i run
python manage.py runsslserver [-addrport 127.0.0.1:9000]

i am getting below errors. Installation of django-sslserver ran fine. Can anybody suggest whats going wrong here .

Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/home/tct/onelogin_env/local/lib/python2.7/site-packages/django/core/management/init.py", line 399, in execute_from_command_line
utility.execute()
File "/home/tct/onelogin_env/local/lib/python2.7/site-packages/django/core/management/init.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/tct/onelogin_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/tct/onelogin_env/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
output = self.handle(_args, *_options)
TypeError: handle() got multiple values for keyword argument 'addrport'

Thanks
Mak

proper command line syntax with certificates

How do I run the manage.py command with an ip address and port with the certificates?

from the documentation the command line is
$ python manage.py runsslserver --certificate /path/to/certificate.crt --key /path/to/key.key

so where do I put 127.0.0.1:8020 , after the certificates???

$ python manage.py runsslserver --certificate /path/to/certificate.crt --key /path/to/key.key 127.0.0.1:8020

And should the leading slash be placed where it is, or should I not put it there so that Linux is using the relative path?

Thanks

Support for IPv6?

Does django-sslserver allow binding to an IPv6 address? I ask because when I bind to an IPv4 address like 127.0.0.1 or 192.168.1.2, the server works very well (except my browser complains that the certificate was for my www.domain.com, not 192.168.1.2). But when I try to bind to my IPv6 address, I get...

Django version 2.0.2, using settings 'myproject.settings' Starting development server at https://[redacted IPv6 address]:443/ Using SSL certificate: [redacted] Using SSL key: [redacted] Quit the server with CTRL-BREAK. Error: [Errno 11001] getaddrinfo failed

Better integration with HTTP

I get a redirect loop using Django 1.4 - I'm using the django-privatebeta middleware which does redirections, plus easy-userena which is configured to redirect http to https. Happens with https://localhost:8000/

Also, with http://localhost:8000/, I get 'connection was interrupted' in Chrome. The site works OK with the normal runserver.

ERR_CERT_COMMON_NAME_INVALID

I follow these two instruction to address the cert errors, but both didn't work.

Option 1: Tell your browser to explicitly trust the certificate. You can do this in your browser's "advanced settings" tab, by installing sslserver/certs/development.crt as a trusted certificate. The mechanism for this varies from browser to browser.

Option 2: Use a certificate from a CA that your browser trusts, for example Letsencrypt. If you have a certificate/key pair from a certificate authority, you can tell Django SSL Server to use it with the following arguments:

Initiating the django server after implementing django-ssl

The application was working successfully on the Linux server.

I am trying to implement the ssl functionality and getting the stack trace below.

Any suggestions as to what is going on and how to fix this.

We are running the dev server with a separate Apache server acting as a proxy.

Thanks

[26/Nov/2014 10:38:24] "GET /waitlist/ HTTP/1.1" 200 6341
[26/Nov/2014 11:30:50] code 400, message Bad HTTP/0.9 request type ('\x16\x03\x01\x00C\x01\x00\x00?\x03\x01Tv\x0eJ\xb2\xecd\x1f\xf5)\xd3\x8a\x9a4\xa5\x8c\xd3U;\x04C')
Traceback (most recent call last):
File "/opt/python-2.7.8/lib/python2.7/SocketServer.py", line 595, in process_request_thread
self.finish_request(request, client_address)
File "/opt/python-2.7.8/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/opt/python-2.7.8/lib/python2.7/site-packages/Django-1.7.1-py2.7.egg/django/core/servers/basehttp.py", line 129, in init
super(WSGIRequestHandler, self).init(_args, *_kwargs)
File "/opt/python-2.7.8/lib/python2.7/SocketServer.py", line 651, in init
self.handle()
File "/opt/python-2.7.8/lib/python2.7/wsgiref/simple_server.py", line 117, in handle
if not self.parse_request(): # An error code has been sent, just exit
File "/opt/python-2.7.8/lib/python2.7/BaseHTTPServer.py", line 281, in parse_request
"Bad HTTP/0.9 request type (%r)" % command)
File "/opt/python-2.7.8/lib/python2.7/BaseHTTPServer.py", line 368, in send_error
self.send_response(code, message)
File "/opt/python-2.7.8/lib/python2.7/BaseHTTPServer.py", line 385, in send_response
self.log_request(code)
File "/opt/python-2.7.8/lib/python2.7/BaseHTTPServer.py", line 422, in log_request
self.requestline, str(code), str(size))
File "/opt/python-2.7.8/lib/python2.7/site-packages/Django-1.7.1-py2.7.egg/django/core/servers/basehttp.py", line 136, in log_message
msg = "[%s] %s\n" % (self.log_date_time_string(), format % args)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb2 in position 16: ordinal not in range(128)

ImportError: cannot import name upath

Hello ,
I am using django 1.4 , but this django ssl server doesn't seem to work here it gives Error 'ImportError: cannot import name upath' i guess upath is not present in my django.utils._os . Do i need to use some specific version of django ssl server for django 1.4 ? Please Help in this matter.

Thanks

ssl.SSLEOFError error on 302 login redirect response

Hello,

When using Django AllAuth, the server issues a redirect after login, signup, logoff etc.
This causes an SSLEOFError error when using django-sslserver. The redirect succeeds, but the following is written to the log.

[21/Dec/2015 09:14:47] "GET /accounts/login/ HTTP/1.1" 302 0
Traceback (most recent call last):
File "/usr/lib/python3.4/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.4/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.4/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.4/wsgiref/handlers.py", line 453, in _write
self.stdout.write(data)
File "/usr/lib/python3.4/socket.py", line 394, in write
return self._sock.send(b)
File "/usr/lib/python3.4/ssl.py", line 702, in send
v = self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1638)

When running the same flow on heroku, the redirects to not cause any ssl errors.

https://pypi.python.org/pypi/django-allauth
allauth.account.adapter.DefaultAccountAdapter#get_login_redirect_url

python 3.4.3
Django==1.8.6
django-sslserver==0.18
django-allauth==0.24.1

sslserver always complaining

Hi,

I tried to run the SSL server and it's always complaining. The server runs fine with the https, but it shows me this:

Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
self._write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
result = self.stdout.write(data)
File "/usr/lib/python3.5/socket.py", line 593, in write
return self._sock.send(b)
File "/usr/lib/python3.5/ssl.py", line 861, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 586, in write
return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1844)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 141, in run
self.handle_error()
File "/home/edward/Desktop/virtualenv/rms/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 88, in handle_error
super(ServerHandler, self).handle_error()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 368, in handle_error
self.finish_response()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib/python3.5/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib/python3.5/wsgiref/handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "/usr/lib/python3.5/wsgiref/handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):
File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.5/socketserver.py", line 681, in init
self.handle()
File "/home/edward/Desktop/virtualenv/rms/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 155, in handle
handler.run(self.server.get_app())
File "/usr/lib/python3.5/wsgiref/handlers.py", line 144, in run
self.close()
File "/usr/lib/python3.5/wsgiref/simple_server.py", line 36, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'

Do any of you guys have an idea what's the issue and how to resolve it?

AttributeError: 'NoneType' object has no attribute 'split'

I'm running Python 3.5 and Django 2.0.2.

After installing django-sslserver, I'm seeing an exception whenever there's any sort of POST to my localhost server. It doesn't yet seem to be causing any problems, but any advice would be appreciated.

Here's the traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
    self._write(data)
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "/usr/lib/python3.5/socket.py", line 593, in write
    return self._sock.send(b)
  File "/usr/lib/python3.5/ssl.py", line 861, in send
    return self._sslobj.write(data)
  File "/usr/lib/python3.5/ssl.py", line 586, in write
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1844)
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 46760)
Traceback (most recent call last):
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 279, in write
    self._write(data)
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "/usr/lib/python3.5/socket.py", line 593, in write
    return self._sock.send(b)
  File "/usr/lib/python3.5/ssl.py", line 861, in send
    return self._sslobj.write(data)
  File "/usr/lib/python3.5/ssl.py", line 586, in write
    return self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1844)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 141, in run
    self.handle_error()
  File "/home/user/git_projects/django/env/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 86, in handle_error
    super().handle_error()
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 368, in handle_error
    self.finish_response()
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 274, in write
    self.send_headers()
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 344, in client_is_modern
    return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 313, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 341, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/home/user/git_projects/django/env/lib/python3.5/site-packages/django/core/servers/basehttp.py", line 154, in handle
    handler.run(self.server.get_app())
  File "/usr/lib/python3.5/wsgiref/handlers.py", line 144, in run
    self.close()
  File "/usr/lib/python3.5/wsgiref/simple_server.py", line 36, in close
    self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------

Python 2.7 and PROTOCOL_TLSv1_2

The Python 2.7 ssl module does not have a ssl.PROTOCOL_TLSv1_2. This causes django-sslserver version 0.20 to fail. This error goes away when I revert to version 0.19

cannot import upath

-> % ./manage.py runsslserver
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
      execute_from_command_line(sys.argv)
    File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
        utility.execute()
  File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
      klass = load_command_class(app_name, subcommand)
  File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
      module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
      __import__(name)
   File "/home/zef/virtualenv/dash/local/lib/python2.7/site-packages/sslserver/management/commands/runsslserver.py", line 13, in <module>
from django.utils._os import upath
ImportError: cannot import name upath

Running Django 1.4.3 with django-sslserver==0.11

Ive verified the existence of 'sslserver' in INSTALLED_APPS, am I missing anything?

Thanks
Adam

Document which Python versions are supported

It would be helpful to document in setup.py which versions of Python are explicitly supported. Nowadays it's pretty typical to support 2.7, 3.4+ or just 3.4+ (I haven't tested this on 2.7).

This is typically done with trove classifiers.

If you let me know what versions you plan to support, I'm happy to submit a PR for it.

Port parameter

It would be great to have a command line option to set which port to serve from. The django run server command has this feature.


Great stuff though, I am using this along with an ssh tunnel to develop with a 3rd party api.

For the curious, the tunnel command is:

ssh -R443:127.0.0.1:8000 [email protected]

You must also add GatewayPorts yes to /etc/ssh/sshd_config.

Cannot connect in Firefox and Chrome

Hello,

I'm trying to include sslserver in my project.

After adding it, in Firefox I got this error:

"Using the default settings, your local browser will make all sorts of noise that it doesn't trust the certificate. This is expected.".

I'm not pretty sure if that is the expected error that you talk about in the documentation. Anyway, I decided to add the key in the browser as you said there. After that, I couldn't enter to my localhost. Any idea about what's going on?

In Chrome I couldn't add the key, because when I tried to import it, Chrome asks for the password that has been used to encrypt the key.

Connection not secure

I followed the steps as per the readme and when I run the server it shows connection not secure due to invalid certificate, although the https is working.

No auto-reload support

It would be great to add auto-reload to the runsslserver command. Like the runserver functionality.

Force redirect http to https using SECURE_SSL_REDIRECT = True

From Django docs on SECURE_SSL_REDIRECT

If True, the SecurityMiddleware redirects all non-HTTPS requests to HTTPS 

i have added django.middleware.security.SecurityMiddleware to MIDDLEWARE list in settings.py

Using SECURE_SSL_REDIRECT = True with runsslserver doesn't redirect all http traffic to https, even the server is not gonna hit from browser/client when try with http

This issue is asked and well described here on stackoverflow

https://stackoverflow.com/questions/41221890/redirect-http-to-https-in-django-using-sslserver

Django==2.0
Python==3.6
django-sslserver==0.20

ImportError: cannot import name

I followed the README.rst file carefully, but I cannot get the project to run. I'm on Python 2.7.1 and Django 1.6.2.

campbellg-mbpdu djangoProject $ python manage.py runsslserver
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 75, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/Library/Python/2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/Library/Python/2.7/site-packages/sslserver/management/commands/runsslserver.py", line 9, in <module>
    from django.core.servers.basehttp import WSGIServerException
ImportError: cannot import name WSGIServerException

Thanks!

Bad request [syntax|version|request type] messages

I'm using the software with my Django 1.8.7 server on linux, listening on port 443. I sometimes see error messages in the logs saying

"Bad request version , you're accessing the development server over HTTPS, but it only supports HTTP".

Any idea how this might be happening? The server is being launched from supervisord, and I'm also not quite sure why I'm seeing two processes (one is a child of the other), that are both "python manage.py runsslserver ...."

SSL handshake freeze randomly

Versions:

Django 1.9.7
Python 2.7.9
Django-sslserver 0.20
Safari 10.1.2

running server with both --nothread and --noreload options to keep it simple.

When too many consequent requests, last request freeze at point:
self._sslobj.write(data)
That is from Python's ssl.py.

Closing the browser doesn't let it go and if I use Firefox instead, it waits about 3 seconds and resolves the freeze at the server side.

Unfortunately, I can not reproduce with exact steps, it appears only when I reload the page every second. To keep going, I have to stop and run the server again.

use ip problem

hello,I am using sslserver
when I use 127.0.0.1:8000 to start ,its ok
But when i use my ip or 0.0.0.0:8000 ,and not use 127.0.0.1 I got error ' Bad Request (400)'
Please help me..

Generating binary data causes an error

Greetings,

I have noticed that if my view returns a binary document (a PDF document in my case), I receive the following error:

[29/Mar/2015 20:10:13] "POST /wallet/pdf_backup_key/ HTTP/1.1" 200 0
Traceback (most recent call last):
  File "/usr/lib/python3.4/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.4/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/usr/lib/python3.4/wsgiref/handlers.py", line 279, in write
    self._write(data)
  File "/usr/lib/python3.4/wsgiref/handlers.py", line 453, in _write
    self.stdout.write(data)
  File "/usr/lib/python3.4/socket.py", line 391, in write
    return self._sock.send(b)
  File "/usr/lib/python3.4/ssl.py", line 679, in send
    v = self._sslobj.write(data)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1636)

My code is the following:

 response = HttpResponse(content_type='application/pdf')
 response['Content-Disposition'] = 'attachment; filename="backup_key.pdf"'
 p = canvas.Canvas(response)
 # Here I add some elements in my PDF document
 p.showPage()
 p.save()
 return response

What is noticeable is that in normal http mode it works perfectly.

I have discovered that the class HttpResponse, by default, creates a content which is b'', which does not seem to be allowed by ssl. That empty string is kept also if, later, I add further data (my pdf document).
I have temporarily solved the problem by specifying a content, such as response = HttpResponse(content='hello', ...), but it is a silly solution.

Django <=1.7 versions are not supported any more. Update dependency in setup.py

Hello!

It seams like actual version of django-sslserver doesn't really support version of Django 1.7 and older, as django.core.management.commands.BaseCommand.add_arguments doesn't exist in this versions. Execution of python manage.py runsslserver results in

Unhandled exception in thread started by <function wrapper at 0x7f4cff6ae9b0>
Traceback (most recent call last):
  File "path_to_virtualenv/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 222, in wrapper
    fn(*args, **kwargs)
  File "path_to_virtualenv/local/lib/python2.7/site-packages/sslserver/management/commands/runsslserver.py", line 109, in inner_run
    self.check_certs(key_file, cert_file)
  File "path_to_virtualenv/local/lib/python2.7/site-packages/sslserver/management/commands/runsslserver.py", line 97, in check_certs
    if not os.path.exists(key_file):
  File "path_to_virtualenv/lib/python2.7/genericpath.py", line 18, in exists
    os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

Should dependency in setup.py be updated to Django >= 1.8 (Django >= 1.4 now)?

P.S. Seem like the last version of django-sslserver supporting Django 1.7 is 0.15

Chrome is phasing out acceptance of the SHA1 hashing algorithm for key signatures

Hi

So I'm using django-sslserver to run my local dev on https://localhost:8000, I'm having some issues with chrome complaining about the certificate.

I've added exceptions for the certificate in chrome, but it still complains due to the use of SHA-1 it seems
django-sslserver-problem

Should I roll out another certificate using a different hashing algorithm as a fix for the time being and replace the old one? Also should a different algorithm be used by django-sslserver in the future?

Some relevant links http://security.stackexchange.com/a/52838 and http://googleonlinesecurity.blogspot.com.au/2014/09/gradually-sunsetting-sha-1.html which indicate google is phasing out acceptance of SHA-1

Support Django 1.4

I know you are require'ing Django 1.5 - thought I would mention that the upath() function in django.utils._os is not found under Django 1.4.

Maybe there is a simple fix for this (perhaps a dummy upath function and restricting to run only on Python 2.x, since 1.5 was first release to support Python 3).

Thanks for a really useful app - should be much easier than messing around with fallback to an http version of site that's really SSL-only!

ImportError: cannot import name patterns

Does this look familiar to anyone? I just tried using this tool with onelogin's demo-django app for their python-saml developer toolkit, and I get this error. Usually when I see this it means there is a circular import, but I moved the offending import into a function to be dynamic and the problem was still there.

Is there perhaps a django version mismatch? Any ideas?

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.