e42009c466dbb77532a96f7ce61cda68c4cc2708,django/comicsite/views.py,,inserted_file,#Any#Any#Any#,283
Before Change
if not hasattr(settings,"COMIC_PUBLIC_FOLDER_NAME"):
raise ImproperlyConfigured("Don"t know from which folder serving files is allowed. Please add a setting \
"COMIC_PUBLIC_FOLDER_NAME = \"public_html\" to your .conf file." )
if not filepath.startswith(settings.COMIC_PUBLIC_FOLDER_NAME):
//FIXME: throw 403 or proper permission denied here
raise Http404("Permission Denied. Only objects in folder named "%s" can be served without credentials\
FIXME: throw proper 403 or permission denied here." % settings.COMIC_PUBLIC_FOLDER_NAME )
After Change
filename = path.join(settings.DROPBOX_ROOT,site_short_name,filepath)
if can_access(request.user,
filename,
site_short_name,
override_permission=ComicSiteModel.REGISTERED_ONLY):
try:
file = open(filename,"rb")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: comic/grand-challenge.org
Commit Name: e42009c466dbb77532a96f7ce61cda68c4cc2708
Time: 2013-08-12
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/views.py
Class Name:
Method Name: inserted_file
Project Name: comic/grand-challenge.org
Commit Name: 3690017687aaa601f0c300e20a43af1cd4905c5a
Time: 2013-08-12
Author: w.s.kerkstra@gmail.com
File Name: django/comicsite/views.py
Class Name:
Method Name: inserted_file
Project Name: comic/grand-challenge.org
Commit Name: b1fb5fe599405f3b4e28e55d05539edf5deddf13
Time: 2018-08-29
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/serving/views.py
Class Name:
Method Name: serve_folder