mirror of https://gitlab.com/bashrc2/epicyon
Additional checking of digit string lengths
parent
0aed7b03ea
commit
0baec75b68
|
@ -17617,7 +17617,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if reply_handle not in reply_to_list:
|
if reply_handle not in reply_to_list:
|
||||||
reply_to_list.append(reply_handle)
|
reply_to_list.append(reply_handle)
|
||||||
if ment.startswith('page='):
|
if ment.startswith('page='):
|
||||||
reply_page_str = ment.replace('page=', '')
|
reply_page_str = ment.replace('page=', '')
|
||||||
if len(reply_page_str) > 5:
|
if len(reply_page_str) > 5:
|
||||||
reply_page_str = "1"
|
reply_page_str = "1"
|
||||||
if reply_page_str.isdigit():
|
if reply_page_str.isdigit():
|
||||||
|
|
|
@ -1701,9 +1701,13 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
post_index_str = command_str.split('read ')[1]
|
post_index_str = command_str.split('read ')[1]
|
||||||
else:
|
else:
|
||||||
post_index_str = command_str.split('show ')[1]
|
post_index_str = command_str.split('show ')[1]
|
||||||
|
if len(post_index_str) > 5:
|
||||||
|
post_index_str = "1"
|
||||||
if box_json and post_index_str.isdigit():
|
if box_json and post_index_str.isdigit():
|
||||||
_desktop_clear_screen()
|
_desktop_clear_screen()
|
||||||
_desktop_show_banner()
|
_desktop_show_banner()
|
||||||
|
if len(post_index_str) > 5:
|
||||||
|
post_index_str = "1"
|
||||||
post_index = int(post_index_str)
|
post_index = int(post_index_str)
|
||||||
post_json_object = \
|
post_json_object = \
|
||||||
_read_local_box_post(session, nickname, domain,
|
_read_local_box_post(session, nickname, domain,
|
||||||
|
@ -1764,6 +1768,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
elif not actor_json and box_json:
|
elif not actor_json and box_json:
|
||||||
_desktop_clear_screen()
|
_desktop_clear_screen()
|
||||||
_desktop_show_banner()
|
_desktop_show_banner()
|
||||||
|
if len(post_index_str) > 5:
|
||||||
|
post_index_str = "1"
|
||||||
post_index = int(post_index_str)
|
post_index = int(post_index_str)
|
||||||
actor_json = \
|
actor_json = \
|
||||||
_desktop_show_profile(session, nickname, domain,
|
_desktop_show_profile(session, nickname, domain,
|
||||||
|
@ -1870,6 +1876,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -1909,6 +1917,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -1941,6 +1951,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -1983,6 +1995,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2015,6 +2029,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2046,6 +2062,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2082,6 +2100,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
else:
|
else:
|
||||||
|
@ -2128,6 +2148,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2160,6 +2182,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2203,6 +2227,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2236,6 +2262,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_page = 1
|
curr_page = 1
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
page_num = command_str.split(' ')[-1].strip()
|
page_num = command_str.split(' ')[-1].strip()
|
||||||
|
if len(page_num) > 5:
|
||||||
|
page_num = "1"
|
||||||
if page_num.isdigit():
|
if page_num.isdigit():
|
||||||
curr_page = int(page_num)
|
curr_page = int(page_num)
|
||||||
follow_requests_json = \
|
follow_requests_json = \
|
||||||
|
@ -2255,6 +2283,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_page = 1
|
curr_page = 1
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
page_num = command_str.split(' ')[-1].strip()
|
page_num = command_str.split(' ')[-1].strip()
|
||||||
|
if len(page_num) > 5:
|
||||||
|
page_num = "1"
|
||||||
if page_num.isdigit():
|
if page_num.isdigit():
|
||||||
curr_page = int(page_num)
|
curr_page = int(page_num)
|
||||||
following_json = \
|
following_json = \
|
||||||
|
@ -2275,6 +2305,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_page = 1
|
curr_page = 1
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
page_num = command_str.split(' ')[-1].strip()
|
page_num = command_str.split(' ')[-1].strip()
|
||||||
|
if len(page_num) > 5:
|
||||||
|
page_num = "1"
|
||||||
if page_num.isdigit():
|
if page_num.isdigit():
|
||||||
curr_page = int(page_num)
|
curr_page = int(page_num)
|
||||||
followers_json = \
|
followers_json = \
|
||||||
|
@ -2484,6 +2516,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
@ -2555,6 +2589,8 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
curr_index = 0
|
curr_index = 0
|
||||||
if ' ' in command_str:
|
if ' ' in command_str:
|
||||||
post_index = command_str.split(' ')[-1].strip()
|
post_index = command_str.split(' ')[-1].strip()
|
||||||
|
if len(post_index) > 5:
|
||||||
|
post_index = "1"
|
||||||
if post_index.isdigit():
|
if post_index.isdigit():
|
||||||
curr_index = int(post_index)
|
curr_index = int(post_index)
|
||||||
if curr_index > 0 and box_json:
|
if curr_index > 0 and box_json:
|
||||||
|
|
|
@ -453,6 +453,8 @@ def get_following_feed(base_dir: str, domain: str, port: int, path: str,
|
||||||
page_number = None
|
page_number = None
|
||||||
if '?page=' in path:
|
if '?page=' in path:
|
||||||
page_number = path.split('?page=')[1]
|
page_number = path.split('?page=')[1]
|
||||||
|
if len(page_number) > 5:
|
||||||
|
page_number = "1"
|
||||||
if page_number == 'true' or not authorized:
|
if page_number == 'true' or not authorized:
|
||||||
page_number = 1
|
page_number = 1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -986,6 +986,8 @@ def person_box_json(recent_posts_cache: {},
|
||||||
page_number = None
|
page_number = None
|
||||||
if '?page=' in path:
|
if '?page=' in path:
|
||||||
page_number = path.split('?page=')[1]
|
page_number = path.split('?page=')[1]
|
||||||
|
if len(page_number) > 5:
|
||||||
|
page_number = 1
|
||||||
if page_number == 'true':
|
if page_number == 'true':
|
||||||
page_number = 1
|
page_number = 1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -462,6 +462,8 @@ def get_shares_feed_for_person(base_dir: str,
|
||||||
page_number = None
|
page_number = None
|
||||||
if '?page=' in path:
|
if '?page=' in path:
|
||||||
page_number = path.split('?page=')[1]
|
page_number = path.split('?page=')[1]
|
||||||
|
if len(page_number) > 5:
|
||||||
|
page_number = 1
|
||||||
if page_number == 'true':
|
if page_number == 'true':
|
||||||
page_number = 1
|
page_number = 1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -341,16 +341,19 @@ def html_calendar(person_cache: {}, translate: {},
|
||||||
if '=' in part:
|
if '=' in part:
|
||||||
if part.split('=')[0] == 'year':
|
if part.split('=')[0] == 'year':
|
||||||
num_str = part.split('=')[1]
|
num_str = part.split('=')[1]
|
||||||
if num_str.isdigit():
|
if len(num_str) <= 5:
|
||||||
year = int(num_str)
|
if num_str.isdigit():
|
||||||
|
year = int(num_str)
|
||||||
elif part.split('=')[0] == 'month':
|
elif part.split('=')[0] == 'month':
|
||||||
num_str = part.split('=')[1]
|
num_str = part.split('=')[1]
|
||||||
if num_str.isdigit():
|
if len(num_str) <= 3:
|
||||||
month_number = int(num_str)
|
if num_str.isdigit():
|
||||||
|
month_number = int(num_str)
|
||||||
elif part.split('=')[0] == 'day':
|
elif part.split('=')[0] == 'day':
|
||||||
num_str = part.split('=')[1]
|
num_str = part.split('=')[1]
|
||||||
if num_str.isdigit():
|
if len(num_str) <= 3:
|
||||||
day_number = int(num_str)
|
if num_str.isdigit():
|
||||||
|
day_number = int(num_str)
|
||||||
elif part.split('=')[0] == 'ical':
|
elif part.split('=')[0] == 'ical':
|
||||||
bool_str = part.split('=')[1]
|
bool_str = part.split('=')[1]
|
||||||
if bool_str.lower().startswith('t'):
|
if bool_str.lower().startswith('t'):
|
||||||
|
|
Loading…
Reference in New Issue