forked from 0x2620/pandora
first round of input sanitization
This commit is contained in:
parent
b62b58a967
commit
67bc4475e9
7 changed files with 44 additions and 28 deletions
|
|
@ -433,10 +433,10 @@ def edit(request):
|
|||
response = json_response(status=200, text='ok')
|
||||
if 'notes' in data:
|
||||
if request.user.get_profile().capability('canEditMetadata'):
|
||||
item.notes = data['notes']
|
||||
item.notes = ox.parse_html(data['notes'])
|
||||
del data['notes']
|
||||
if 'rightslevel' in data:
|
||||
item.level = data['rightslevel']
|
||||
item.level = int(data['rightslevel'])
|
||||
del data['rightslevel']
|
||||
if 'user' in data:
|
||||
if request.user.get_profile().get_level() in ('admin', 'staff') and \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue