Skip to content

Commit

Permalink
Merge pull request #15 from girder/user-creation
Browse files Browse the repository at this point in the history
Guard against creation of files under user
  • Loading branch information
cjh1 authored Jun 4, 2018
2 parents ce0b3fa + 2e93199 commit ddd2141
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
40 changes: 40 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
=============
Release Notes
=============

This is the summary list of changes to girder_jupyter between each release. For full
details, see the commit logs at https://github.com/girder/girder_jupyter

Unreleased
==========

Added Features
--------------

Bug fixes
---------

Changes
-------

Deprecations
------------

DevOps
------

Removals
--------

Security Fixes
--------------


girder_jupyter 0.2.0
====================


Bug fixes
---------

* Guard against file creation under a user.
5 changes: 4 additions & 1 deletion girder_jupyter/contents/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ def _upload_to_path(self, content, mime_type, format, path):

parent = self._create_folders('/'.join(folder_path))

if self._is_item(parent):
if self._is_user(parent):
raise web.HTTPError(400, 'Can\'t create file under user.',
reason='Can\'t create file under user.')
elif self._is_item(parent):
item = parent
else:
item = self.gc.loadOrCreateItem(name, parent['_id'], reuseExisting=True)
Expand Down

0 comments on commit ddd2141

Please sign in to comment.