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

Some fixes to tocUtil.py in an attempt to fix unauth'd access #116

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions server/tocUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os.path as op
import re
from tornado.web import HTTPError
import errno
import logging

import h5py
Expand Down Expand Up @@ -103,7 +104,7 @@ def addTocEntry(domain, filePath, userid=None):
if userid is not None:
acl = db.getAcl(group_uuid, userid)
if not acl['create']:
self.log.info("unauthorized access to group:" + group_uuid)
log.info("unauthorized access to group:" + group_uuid)
raise IOError(errno.EACCES) # unauthorized
log.info("createExternalLink -- uuid %s, domain: %s, linkName: %s", group_uuid, domain, linkName)
db.createExternalLink(group_uuid, domain, '/', linkName)
Expand All @@ -113,7 +114,7 @@ def addTocEntry(domain, filePath, userid=None):
if userid is not None:
acl = db.getAcl(group_uuid, userid)
if not acl['create']:
self.log.info("unauthorized access to group:" + group_uuid)
log.info("unauthorized access to group:" + group_uuid)
raise IOError(errno.EACCES) # unauthorized
# create subgroup and link to parent group
subgroup_uuid = db.createGroup()
Expand All @@ -123,7 +124,7 @@ def addTocEntry(domain, filePath, userid=None):
group_uuid = subgroup_uuid

except IOError as e:
log.info("IOError: " + str(e.errno) + " " + e.strerror)
log.info("IOError: " + str(e.errno) + " " + str(e.strerror))
raise e

"""
Expand Down