Don't allow custom font upload

Extraction of the font from POST seems buggy and causes other problems
main
Bob Mottram 2020-05-27 16:08:09 +01:00
parent da148f8e9e
commit c740b07c9f
2 changed files with 7 additions and 8 deletions

View File

@ -5419,8 +5419,7 @@ class PubServer(BaseHTTPRequestHandler):
# extract each image type
actorChanged = True
profileMediaTypes = ('avatar', 'image',
'banner', 'instanceLogo',
'customFont')
'banner', 'instanceLogo')
profileMediaTypesUploaded = {}
for mType in profileMediaTypes:
if self.server.debug:

View File

@ -1167,12 +1167,12 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
themesDropdown += ' <option value="highvis">' + \
translate['HighVis'] + '</option>'
themesDropdown += ' </select><br>'
themesDropdown += \
' <label class="labels">' + \
translate['Custom Font'] + '</label>'
themesDropdown += \
' <input type="file" id="customFont" name="customFont"'
themesDropdown += ' accept="' + fontFormats + '">'
# themesDropdown += \
# ' <label class="labels">' + \
# translate['Custom Font'] + '</label>'
# themesDropdown += \
# ' <input type="file" id="customFont" name="customFont"'
# themesDropdown += ' accept="' + fontFormats + '">'
if os.path.isfile(baseDir + '/fonts/custom.woff') or \
os.path.isfile(baseDir + '/fonts/custom.woff2') or \
os.path.isfile(baseDir + '/fonts/custom.otf') or \