mirror of https://gitlab.com/bashrc2/epicyon
Unquote plus sign
parent
5e1cb80821
commit
224bef3482
29
daemon.py
29
daemon.py
|
@ -1658,7 +1658,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# remove a shared item
|
# remove a shared item
|
||||||
if htmlGET and '?rmshare=' in self.path:
|
if htmlGET and '?rmshare=' in self.path:
|
||||||
shareName = self.path.split('?rmshare=')[1]
|
shareName = self.path.split('?rmshare=')[1]
|
||||||
shareName = urllib.parse.unquote(shareName.strip())
|
shareName = urllib.parse.unquote_plus(shareName.strip())
|
||||||
usersPath = self.path.split('?rmshare=')[0]
|
usersPath = self.path.split('?rmshare=')[0]
|
||||||
actor = \
|
actor = \
|
||||||
self.server.httpPrefix + '://' + \
|
self.server.httpPrefix + '://' + \
|
||||||
|
@ -3357,7 +3357,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
shareDescription = \
|
shareDescription = \
|
||||||
inReplyToUrl.replace('sharedesc:', '')
|
inReplyToUrl.replace('sharedesc:', '')
|
||||||
shareDescription = \
|
shareDescription = \
|
||||||
urllib.parse.unquote(shareDescription.strip())
|
urllib.parse.unquote_plus(shareDescription.strip())
|
||||||
self.path = self.path.split('?replydm=')[0]+'/newdm'
|
self.path = self.path.split('?replydm=')[0]+'/newdm'
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
print('DEBUG: replydm path ' + self.path)
|
print('DEBUG: replydm path ' + self.path)
|
||||||
|
@ -6735,7 +6735,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
moderationStr.split('=')[1].strip()
|
moderationStr.split('=')[1].strip()
|
||||||
moderationText = moderationText.replace('+', ' ')
|
moderationText = moderationText.replace('+', ' ')
|
||||||
moderationText = \
|
moderationText = \
|
||||||
urllib.parse.unquote(moderationText.strip())
|
urllib.parse.unquote_plus(moderationText.strip())
|
||||||
elif moderationStr.startswith('submitInfo'):
|
elif moderationStr.startswith('submitInfo'):
|
||||||
msg = htmlModerationInfo(self.server.translate,
|
msg = htmlModerationInfo(self.server.translate,
|
||||||
self.server.baseDir,
|
self.server.baseDir,
|
||||||
|
@ -6909,7 +6909,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
questionParams = questionParams.replace('+', ' ')
|
questionParams = questionParams.replace('+', ' ')
|
||||||
questionParams = questionParams.replace('%3F', '')
|
questionParams = questionParams.replace('%3F', '')
|
||||||
questionParams = \
|
questionParams = \
|
||||||
urllib.parse.unquote(questionParams.strip())
|
urllib.parse.unquote_plus(questionParams.strip())
|
||||||
# post being voted on
|
# post being voted on
|
||||||
messageId = None
|
messageId = None
|
||||||
if 'messageId=' in questionParams:
|
if 'messageId=' in questionParams:
|
||||||
|
@ -6991,9 +6991,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
searchStr = searchParams.split('searchtext=')[1]
|
searchStr = searchParams.split('searchtext=')[1]
|
||||||
if '&' in searchStr:
|
if '&' in searchStr:
|
||||||
searchStr = searchStr.split('&')[0]
|
searchStr = searchStr.split('&')[0]
|
||||||
searchStr = searchStr.replace('+', ' ')
|
|
||||||
searchStr = \
|
searchStr = \
|
||||||
urllib.parse.unquote(searchStr.strip())
|
urllib.parse.unquote_plus(searchStr.strip())
|
||||||
searchStr2 = searchStr.lower().strip('\n').strip('\r')
|
searchStr2 = searchStr.lower().strip('\n').strip('\r')
|
||||||
print('searchStr: ' + searchStr)
|
print('searchStr: ' + searchStr)
|
||||||
if searchForEmoji:
|
if searchForEmoji:
|
||||||
|
@ -7199,7 +7198,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
removeShareConfirmParams = \
|
removeShareConfirmParams = \
|
||||||
removeShareConfirmParams.replace('+', ' ').strip()
|
removeShareConfirmParams.replace('+', ' ').strip()
|
||||||
removeShareConfirmParams = \
|
removeShareConfirmParams = \
|
||||||
urllib.parse.unquote(removeShareConfirmParams)
|
urllib.parse.unquote_plus(removeShareConfirmParams)
|
||||||
shareActor = removeShareConfirmParams.split('actor=')[1]
|
shareActor = removeShareConfirmParams.split('actor=')[1]
|
||||||
if '&' in shareActor:
|
if '&' in shareActor:
|
||||||
shareActor = shareActor.split('&')[0]
|
shareActor = shareActor.split('&')[0]
|
||||||
|
@ -7262,7 +7261,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitYes=' in removePostConfirmParams:
|
if '&submitYes=' in removePostConfirmParams:
|
||||||
removePostConfirmParams = \
|
removePostConfirmParams = \
|
||||||
urllib.parse.unquote(removePostConfirmParams)
|
urllib.parse.unquote_plus(removePostConfirmParams)
|
||||||
removeMessageId = \
|
removeMessageId = \
|
||||||
removePostConfirmParams.split('messageId=')[1]
|
removePostConfirmParams.split('messageId=')[1]
|
||||||
if '&' in removeMessageId:
|
if '&' in removeMessageId:
|
||||||
|
@ -7354,7 +7353,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitView=' in followConfirmParams:
|
if '&submitView=' in followConfirmParams:
|
||||||
followingActor = \
|
followingActor = \
|
||||||
urllib.parse.unquote(followConfirmParams)
|
urllib.parse.unquote_plus(followConfirmParams)
|
||||||
followingActor = followingActor.split('actor=')[1]
|
followingActor = followingActor.split('actor=')[1]
|
||||||
if '&' in followingActor:
|
if '&' in followingActor:
|
||||||
followingActor = followingActor.split('&')[0]
|
followingActor = followingActor.split('&')[0]
|
||||||
|
@ -7363,7 +7362,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitYes=' in followConfirmParams:
|
if '&submitYes=' in followConfirmParams:
|
||||||
followingActor = \
|
followingActor = \
|
||||||
urllib.parse.unquote(followConfirmParams)
|
urllib.parse.unquote_plus(followConfirmParams)
|
||||||
followingActor = followingActor.split('actor=')[1]
|
followingActor = followingActor.split('actor=')[1]
|
||||||
if '&' in followingActor:
|
if '&' in followingActor:
|
||||||
followingActor = followingActor.split('&')[0]
|
followingActor = followingActor.split('&')[0]
|
||||||
|
@ -7436,7 +7435,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitYes=' in followConfirmParams:
|
if '&submitYes=' in followConfirmParams:
|
||||||
followingActor = \
|
followingActor = \
|
||||||
urllib.parse.unquote(followConfirmParams)
|
urllib.parse.unquote_plus(followConfirmParams)
|
||||||
followingActor = followingActor.split('actor=')[1]
|
followingActor = followingActor.split('actor=')[1]
|
||||||
if '&' in followingActor:
|
if '&' in followingActor:
|
||||||
followingActor = followingActor.split('&')[0]
|
followingActor = followingActor.split('&')[0]
|
||||||
|
@ -7530,7 +7529,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitYes=' in blockConfirmParams:
|
if '&submitYes=' in blockConfirmParams:
|
||||||
blockingActor = \
|
blockingActor = \
|
||||||
urllib.parse.unquote(blockConfirmParams)
|
urllib.parse.unquote_plus(blockConfirmParams)
|
||||||
blockingActor = blockingActor.split('actor=')[1]
|
blockingActor = blockingActor.split('actor=')[1]
|
||||||
if '&' in blockingActor:
|
if '&' in blockingActor:
|
||||||
blockingActor = blockingActor.split('&')[0]
|
blockingActor = blockingActor.split('&')[0]
|
||||||
|
@ -7627,7 +7626,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
if '&submitYes=' in blockConfirmParams:
|
if '&submitYes=' in blockConfirmParams:
|
||||||
blockingActor = \
|
blockingActor = \
|
||||||
urllib.parse.unquote(blockConfirmParams)
|
urllib.parse.unquote_plus(blockConfirmParams)
|
||||||
blockingActor = blockingActor.split('actor=')[1]
|
blockingActor = blockingActor.split('actor=')[1]
|
||||||
if '&' in blockingActor:
|
if '&' in blockingActor:
|
||||||
blockingActor = blockingActor.split('&')[0]
|
blockingActor = blockingActor.split('&')[0]
|
||||||
|
@ -7725,7 +7724,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.POSTbusy = False
|
self.server.POSTbusy = False
|
||||||
return
|
return
|
||||||
optionsConfirmParams = \
|
optionsConfirmParams = \
|
||||||
urllib.parse.unquote(optionsConfirmParams)
|
urllib.parse.unquote_plus(optionsConfirmParams)
|
||||||
# page number to return to
|
# page number to return to
|
||||||
if 'pageNumber=' in optionsConfirmParams:
|
if 'pageNumber=' in optionsConfirmParams:
|
||||||
pageNumberStr = optionsConfirmParams.split('pageNumber=')[1]
|
pageNumberStr = optionsConfirmParams.split('pageNumber=')[1]
|
||||||
|
@ -7763,7 +7762,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
personNotes = optionsConfirmParams.split('optionnotes=')[1]
|
personNotes = optionsConfirmParams.split('optionnotes=')[1]
|
||||||
if '&' in personNotes:
|
if '&' in personNotes:
|
||||||
personNotes = personNotes.split('&')[0]
|
personNotes = personNotes.split('&')[0]
|
||||||
personNotes = urllib.parse.unquote(personNotes.strip())
|
personNotes = urllib.parse.unquote_plus(personNotes.strip())
|
||||||
# Limit the length of the notes
|
# Limit the length of the notes
|
||||||
if len(personNotes) > 64000:
|
if len(personNotes) > 64000:
|
||||||
personNotes = None
|
personNotes = None
|
||||||
|
|
Loading…
Reference in New Issue