|
@ -1717,6 +1717,22 @@ h3 {
|
|||
cursor: pointer;
|
||||
margin: 5px;
|
||||
}
|
||||
.followApproveHandle {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--main-bg-color);
|
||||
border: none;
|
||||
color: var(--main-fg-color);
|
||||
text-align: center;
|
||||
font-size: var(--font-size-header);
|
||||
font-family: 'Arial, Helvetica, sans-serif';
|
||||
padding: var(--button-height-padding);
|
||||
width: 20%;
|
||||
max-width: 200px;
|
||||
min-width: 80px;
|
||||
cursor: pointer;
|
||||
margin: 0 5px;
|
||||
float: right;
|
||||
}
|
||||
.followApprove {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--button-approve);
|
||||
|
@ -2516,6 +2532,22 @@ h3 {
|
|||
cursor: pointer;
|
||||
margin: 15px;
|
||||
}
|
||||
.followApprove {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--main-bg-color);
|
||||
border: none;
|
||||
color: var(--main-fg-color);
|
||||
text-align: center;
|
||||
font-size: var(--font-size3);
|
||||
font-family: 'Arial, Helvetica, sans-serif';
|
||||
padding: var(--button-height-padding-mobile);
|
||||
width: 20%;
|
||||
max-width: 400px;
|
||||
min-width: 80px;
|
||||
cursor: pointer;
|
||||
margin: 0 15px;
|
||||
float: right;
|
||||
}
|
||||
.followApprove {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--button-approve);
|
||||
|
@ -3313,6 +3345,22 @@ h3 {
|
|||
cursor: pointer;
|
||||
margin: 15px;
|
||||
}
|
||||
.followApproveHandle {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--main-bg-color);
|
||||
border: none;
|
||||
color: var(--main-fg-color);
|
||||
text-align: center;
|
||||
font-size: var(--font-size3);
|
||||
font-family: 'Arial, Helvetica, sans-serif';
|
||||
padding: var(--button-height-padding-tiny);
|
||||
width: 20%;
|
||||
max-width: 400px;
|
||||
min-width: 80px;
|
||||
cursor: pointer;
|
||||
margin: 0 15px;
|
||||
float: right;
|
||||
}
|
||||
.followApprove {
|
||||
border-radius: var(--button-corner-radius);
|
||||
background-color: var(--button-approve);
|
||||
|
|
10
inbox.py
|
@ -658,11 +658,14 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str,
|
|||
return None
|
||||
post_domain = get_full_domain(post_domain, post_port)
|
||||
|
||||
content_str = \
|
||||
get_base_content_from_post(post_json_object, system_language)
|
||||
|
||||
if has_object_dict(post_json_object):
|
||||
if is_quote_toot(post_json_object):
|
||||
if debug:
|
||||
if is_quote_toot(post_json_object, content_str):
|
||||
print('REJECT: inbox quote toot ' + str(post_json_object))
|
||||
return None
|
||||
|
||||
if post_json_object['object'].get('inReplyTo'):
|
||||
if isinstance(post_json_object['object']['inReplyTo'], str):
|
||||
in_reply_to = \
|
||||
|
@ -690,8 +693,6 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str,
|
|||
return None
|
||||
|
||||
# filter on the content of the post
|
||||
content_str = \
|
||||
get_base_content_from_post(post_json_object, system_language)
|
||||
if content_str:
|
||||
summary_str = \
|
||||
get_summary_from_post(post_json_object,
|
||||
|
@ -3312,6 +3313,7 @@ def _like_notify(base_dir: str, domain: str,
|
|||
liker_handle = actor
|
||||
if liker_handle == handle:
|
||||
return
|
||||
|
||||
like_str = liker_handle + ' ' + url + '?likedBy=' + actor
|
||||
prev_like_file = account_dir + '/.prevLike'
|
||||
# was there a previous like notification?
|
||||
|
|
|
@ -341,7 +341,7 @@ If you want to block particular fediverse accounts or instances then you can ent
|
|||
Within the *filtering and blocking* section you can also set a city which will be used for geolocation spoofing. When you post a photo, instead of removing all metadata spoofed metadata will be added in order to consistently fool the machine learning systems behind web crawlers or scrapers, and create a [confirmation bias](https://en.wikipedia.org/wiki/Confirmation_bias) effect where the surveillance systems become increasingly confident in an erroneous conclusion. Setting a city somewhere near to your [time zone](https://en.wikipedia.org/wiki/Time_zone) is preferable, so that it matches your typical pattern of daily posting activity without giving away your real location.
|
||||
|
||||
### Verifying your website or blog
|
||||
It is possible to indicate that a website of blog belongs to you by linking it to your profile screen. Within the *head* html section of your website or blog index page include a line similar to:
|
||||
It is possible to indicate that a website or blog belongs to you by linking it to your profile screen. Within the *head* html section of your website or blog index page include a line similar to:
|
||||
``` html
|
||||
<link rel="me" href="https://YourEpicyonDomain/@YourNickname" />
|
||||
```
|
||||
|
|
|
@ -265,7 +265,7 @@ def post_message_to_outbox(session, translate: {},
|
|||
# check that the outgoing post doesn't contain any markup
|
||||
# which can be used to implement exploits
|
||||
if has_object_dict(message_json):
|
||||
if is_quote_toot(message_json):
|
||||
if is_quote_toot(message_json, ''):
|
||||
print('REJECT: POST quote toot ' + str(message_json))
|
||||
return False
|
||||
|
||||
|
|
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.8 KiB |
5
utils.py
|
@ -4161,7 +4161,7 @@ def save_reverse_timeline(base_dir: str, reverse_sequence: []) -> []:
|
|||
break
|
||||
|
||||
|
||||
def is_quote_toot(post_json_object: str) -> bool:
|
||||
def is_quote_toot(post_json_object: str, content: str) -> bool:
|
||||
"""Returns true if the given post is a quote toot
|
||||
"""
|
||||
# Pleroma implementation
|
||||
|
@ -4187,6 +4187,9 @@ def is_quote_toot(post_json_object: str) -> bool:
|
|||
if 'json' not in item['mediaType']:
|
||||
continue
|
||||
return True
|
||||
if content:
|
||||
if 'QT: ' in content:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
@ -1649,7 +1649,8 @@ def _get_footer_with_icons(show_icons: bool,
|
|||
delete_str: str, mute_str: str, edit_str: str,
|
||||
post_json_object: {}, published_link: str,
|
||||
time_class: str, published_str: str,
|
||||
nickname: str, content_license_url: str) -> str:
|
||||
nickname: str, content_license_url: str,
|
||||
translate: {}) -> str:
|
||||
"""Returns the html for a post footer containing icons
|
||||
"""
|
||||
if not show_icons:
|
||||
|
@ -1664,7 +1665,7 @@ def _get_footer_with_icons(show_icons: bool,
|
|||
footer_str += ' '
|
||||
if content_license_url:
|
||||
footer_str += _get_copyright_footer(content_license_url,
|
||||
time_class)
|
||||
translate)
|
||||
# show the date
|
||||
date_link = '/users/' + nickname + '?convthread=' + \
|
||||
published_link.replace('/', '--')
|
||||
|
@ -1806,24 +1807,30 @@ def _get_content_license(post_json_object: {}) -> str:
|
|||
|
||||
|
||||
def _get_copyright_footer(content_license_url: str,
|
||||
time_class: str) -> str:
|
||||
translate: {}) -> str:
|
||||
"""Returns the footer copyright link
|
||||
"""
|
||||
# show the CC symbol
|
||||
copyright_symbol = '🅭 '
|
||||
icon_filename = 'license_cc.png'
|
||||
if '/zero/' in content_license_url:
|
||||
copyright_symbol = '🄍 '
|
||||
icon_filename = 'license_cc0.png'
|
||||
elif 'unlicense' in content_license_url:
|
||||
copyright_symbol = '🅮'
|
||||
icon_filename = 'license_un.png'
|
||||
elif 'wtfpl' in content_license_url:
|
||||
copyright_symbol = '🅮'
|
||||
icon_filename = 'license_wtf.png'
|
||||
elif '/fdl' in content_license_url:
|
||||
copyright_symbol = '🄎'
|
||||
return '<a href="' + \
|
||||
content_license_url + '" class="' + \
|
||||
time_class + '" tabindex="10">' + \
|
||||
'<span itemprop="license">' + \
|
||||
copyright_symbol + '</span></a> '
|
||||
icon_filename = 'license_fdl.png'
|
||||
|
||||
description = translate['Content License']
|
||||
copyright_str = \
|
||||
' ' + \
|
||||
'<a class="imageAnchor" href="' + content_license_url + \
|
||||
'" title="' + description + '" tabindex="10">' + \
|
||||
'<img loading="lazy" decoding="async" title="' + \
|
||||
description + '" alt="' + description + \
|
||||
' |" src="/icons/' + icon_filename + '"/></a>\n'
|
||||
|
||||
return copyright_str
|
||||
|
||||
|
||||
def individual_post_as_html(signing_priv_key_pem: str,
|
||||
|
@ -2366,15 +2373,20 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
|||
|
||||
content_license_url = _get_content_license(post_json_object)
|
||||
if not is_news_post(post_json_object):
|
||||
if show_icons:
|
||||
footer_str = ''
|
||||
else:
|
||||
footer_str = '<div class="' + container_class_icons + '">\n'
|
||||
if content_license_url:
|
||||
footer_str += _get_copyright_footer(content_license_url,
|
||||
time_class)
|
||||
translate)
|
||||
conv_link = '/users/' + nickname + '?convthread=' + \
|
||||
published_link.replace('/', '--')
|
||||
footer_str += '<a href="' + conv_link + \
|
||||
'" class="' + time_class + '" tabindex="10">' + \
|
||||
published_str + '</a>\n'
|
||||
if not show_icons:
|
||||
footer_str += '</div>\n'
|
||||
else:
|
||||
footer_str = '<a href="' + \
|
||||
published_link.replace('/news/', '/news/statuses/') + \
|
||||
|
@ -2463,7 +2475,7 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
|||
delete_str, mute_str, edit_str,
|
||||
post_json_object, published_link,
|
||||
time_class, published_str, nickname,
|
||||
content_license_url)
|
||||
content_license_url, translate)
|
||||
if new_footer_str:
|
||||
footer_str = new_footer_str
|
||||
|
||||
|
|
|
@ -896,16 +896,21 @@ def html_profile(signing_priv_key_pem: str,
|
|||
if follower_domain not in curr_follower_domains:
|
||||
new_follower_domain = ' ✨'
|
||||
|
||||
# Show the handle of the potential follower
|
||||
# being approved, linking to search on that handle
|
||||
base_path = '/users/' + nickname
|
||||
follow_approvals_section += \
|
||||
'<div class="container">'
|
||||
follow_approvals_section += \
|
||||
'<a href="' + follower_actor + \
|
||||
'" tabindex="2">'
|
||||
follow_approvals_section += \
|
||||
'<span class="followRequestHandle">' + \
|
||||
follower_handle + \
|
||||
new_follower_domain + '</span></a>'
|
||||
'<div class="container">\n' + \
|
||||
' <form method="POST" action="' + \
|
||||
base_path + '/searchhandle?page=1">\n' + \
|
||||
' <input type="hidden" ' + \
|
||||
'name="actor" value="' + \
|
||||
follower_actor + '">\n' + \
|
||||
' <button type="submit" ' + \
|
||||
'class="followApproveHandle" ' + \
|
||||
'name="submitSearch" tabindex="2">' + \
|
||||
follower_handle + new_follower_domain + \
|
||||
'</button>\n </form>\n'
|
||||
|
||||
# show Approve and Deny buttons
|
||||
follow_approvals_section += \
|
||||
|
|