Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page history crash if message log break json #28

Closed
mgaitan opened this issue Nov 16, 2014 · 0 comments
Closed

page history crash if message log break json #28

mgaitan opened this issue Nov 16, 2014 · 0 comments
Labels

Comments

@mgaitan
Copy link
Owner

mgaitan commented Nov 16, 2014

For example, a message containing a quotes or comma. It need at least escaping or a simpler parsing.

Environment:


Request Method: GET
Request URL: http://localhost:8000/home/history

Django Version: 1.7
Python Version: 3.4.2
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'waliki_project',
 'waliki',
 'waliki.git',
 'waliki.pdf',
 'waliki.slides',
 'waliki.attachments',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'allauth.socialaccount.providers.github',
 'allauth.socialaccount.providers.twitter')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/home/tin/.virtualenvs/waliki/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/tin/lab/waliki/waliki/acl.py" in _wrapped_view
  63.                 return view_func(request, *args, **kwargs)
File "/home/tin/lab/waliki/waliki/git/views.py" in history
  22.     history = Git().history(page)
File "/home/tin/lab/waliki/waliki/git/__init__.py" in history
  82.                 history.append(json.loads(line))
File "/usr/lib/python3.4/json/__init__.py" in loads
  318.         return _default_decoder.decode(s)
File "/usr/lib/python3.4/json/decoder.py" in decode
  343.         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.4/json/decoder.py" in raw_decode
  359.             obj, end = self.scan_once(s, idx)

Exception Type: ValueError at /home/history
Exception Value: Expecting ',' delimiter: line 1 column 147 (char 146)
@mgaitan mgaitan added the bug label Nov 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant