Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interacting with a toot/microblog with invalid time data fails #622

Open
UmBottesWillen opened this issue Mar 24, 2024 · 14 comments
Open

interacting with a toot/microblog with invalid time data fails #622

UmBottesWillen opened this issue Mar 24, 2024 · 14 comments
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working enhancement New feature or request needs feedback Requires a greater consensus to make an informed decision

Comments

@UmBottesWillen
Copy link

UmBottesWillen commented Mar 24, 2024

Describe the bug
Trying to comment on or upvote a toot with invalid time data leads to server errors.

Edit: Also, the toot/microblog seems to have been made over a year ago, yet was shown first when sorting by new. I think erroneous fields in posts/microblogs should be safeguarded against.

On which Mbin instance did you find the bug?
fedia.io

Which Mbin version was running on the instance?
1.4.1

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://fedia.io/m/random/p/346093/I-deleted-time-again
  2. Interact with the post
  3. See error

Expected behavior
Better error handling with an explicit error message.
Alternatively, ignore invalid time data and allow normal interaction.

@UmBottesWillen UmBottesWillen added the bug Something isn't working label Mar 24, 2024
@BentiGorlich
Copy link
Member

Main problem is probably that the post says it is posted in 2000 years from now, so yeah we should not accept created dates in the future. I don't know why that leads to an error when liking the post though

@BentiGorlich BentiGorlich added activitypub ActivityPub related issues backend Backend related issues and pull requests labels Mar 24, 2024
@UmBottesWillen
Copy link
Author

UmBottesWillen commented Mar 24, 2024

I think it would be best to preserve the invalid timestamp in one form or another, and to expose it to the user, but allow the actual timestamp used for computation to not exceed the time the post was first created/federated.

@BentiGorlich
Copy link
Member

What benefit is in displaying the invalid timestamp we got to the user?

@UmBottesWillen
Copy link
Author

My suggestion to display the invalid time (in addition to the timestamp the backend assigned to the post for computation) is informed by my dislike for hard-coding assumptions about what the user does and doesn't want or need to see. Personally as a user, knowing that the post linked above has a timestamp for 2000 years into the future, I wouldn't want that information being hidden from me.

Another argument for keeping and exposing the invalid timestamp is to ensure parity between different fediverse software. The post above was made on a platform other than Mbin and on that platform, the invalid timestamp is displayed. Not displaying that timestamp on Mbin could lead to confusion.

@BentiGorlich BentiGorlich added the needs feedback Requires a greater consensus to make an informed decision label Mar 25, 2024
@TheVillageGuy
Copy link
Contributor

Um, looks pretty serious, I was doing some interaction, tried replying and then after three attempts got this

'\n \n<h3 hidden>Add comment</h3>\n<form name="post_comment" method="post" action="/m/random/p/346093/-/reply" class="comment-add" enctype="multipart/form-data">\n<div class="row">\n <markdown-toolbar for="post_comment_660152b8228123.78078721_body" class="markdown meta">\n <md-bold title="Bold" aria-label="Bold">\n <i class="fa-solid fa-bold" aria-hidden="true"></i>\n </md-bold>\n <md-italic title="Italic" aria-label="Italic">\n <i class="fa-solid fa-italic" aria-hidden="true"></i>\n </md-italic >\n <md-strikethrough title="Strikethrough" aria-label="Strikethrough">\n <i class="fa-solid fa-strikethrough" aria-hidden="true"></i>\n </md-strikethrough>\n <md-header title="Header" aria-label="Header">\n <i class="fa-solid fa-heading" aria-hidden="true"></i>\n </md-header>\n <md-quote title="Quote" aria-label="Quote">\n <i class="fa-solid fa-quote-left" aria-hidden="true"></i>\n </md-quote>\n <md-code title="Code" aria-label="Code">\n <i class="fa-solid fa-code" aria-hidden="true"></i>\n </md-code>\n <md-link title="Link" aria-label="Link">\n <i class="fa-solid fa-link" aria-hidden="true"></i>\n </md-link>\n <md-image title="Image" aria-label="Image">\n <i class="fa-solid fa-image" aria-hidden="true"></i>\n </md-image>\n <md-unordered-list title="Unordered List" aria-label="Unordered List">\n <i class="fa-solid fa-list" aria-hidden="true"></i>\n </md-unordered-list>\n <md-ordered-list title="Ordered List" aria-label="Ordered List">\n <i class="fa-solid fa-list-ol" aria-hidden="true"></i>\n </md-ordered-list>\n <md-mention title="Mention" aria-label="Mention">\n <i class="fa-solid fa-at" aria-hidden="true"></i>\n </md-mention>\n</markdown-toolbar>\n\n <div><textarea id="post_comment_660152b8228123.78078721_body" name="post_comment[body]" data-controller="input-length rich-textarea autogrow" data-action="input-length#updateDisplay" data-input-length-max-value="5000">@foxes@myfriendsare.gay</textarea></div>\n</div>\n<div class="row actions">\n <ul>\n <li class="dropdown">\n <button type="button"\n class="btn btn__secondary"\n aria-label="Add media"\n title="Add media">\n <i class="fa-solid fa-photo-film" aria-hidden="true"></i>\n </button>\n <div class="dropdown__menu">\n <div class="media" data-controller="image-upload">\n <div class="image-preview-container">\n <img class="image-preview" src="#">\n <button type="button" class="image-preview-clear" data-action="image-upload#clearPreview">x</button>\n </div>\n <div>\n <div><label for="post_comment_660152b8228123.78078721_image">Image</label><input type="file" id="post_comment_660152b8228123.78078721_image" name="post_comment[image]" class="image-input" /></div>\n <div hidden>\n <div><label for="post_comment_660152b8228123.78078721_imageUrl">URL</label><input type="text" id="post_comment_660152b8228123.78078721_imageUrl" name="post_comment[imageUrl]" inputmode="url" /></div>\n </div>\n <div class="actions">\n <button type="button" class="btn btn__secondary" data-action="media#add">\n <i class="fa-solid fa-upload" aria-hidden="true"></i> Upload file\n </button>\n <button type="button" class="btn btn__secondary" data-action="media#add">\n <i class="fa-solid fa-globe" aria-hidden="true"></i> From url\n </button>\n </div>\n <div><label for="post_comment_660152b8228123.78078721_imageAlt">Image alternative text</label><textarea id="post_comment_660152b8228123.78078721_imageAlt" name="post_comment[imageAlt]"></textarea></div>\n </div>\n</div>\n </div>\n </li>\n <li class="select">\n <div><select id="post_comment_660152b8228123.78078721_lang" name="post_comment[lang]"> <option value="en" selected="selected">English</option><option disabled="disabled">-------------------</option><option value="aa">Afar</option><option value="ab">Abkhazian</option><option value="ace">Achinese</option><option value="ach">Acoli</option><option value="ada">Adangme</option><option value="ady">Adyghe</option><option value="ae">Avestan</option><option value="aeb">Tunisian Arabic</option><option value="af">Afrikaans</option><option value="afh">Afrihili</option><option value="agq">Aghem</option><option value="ain">Ainu</option><option value="ak">Akan</option><option value="akk">Akkadian</option><option value="akz">Alabama</option><option value="ale">Aleut</option><option value="aln">Gheg Albanian</option><option value="alt">Southern Altai</option><option value="am">አማርኛ</option><option value="an">Aragonese</option><option value="ang">Old English</option><option value="ann">Obolo</option><option value="anp">Angika</option><option value="ar">العربية</option><option value="arc">Aramaic</option><option value="arn">Mapuche</option><option value="aro">Araona</option><option value="arp">Arapaho</option><option value="arq">Algerian Arabic</option><option value="ars">Najdi Arabic</option><option value="arw">Arawak</option><option value="ary">Moroccan Arabic</option><option value="arz">Egyptian Arabic</option><option value="as">অসমীয়া</option><option value="asa">Asu</option><option value="ase">American Sign Language</option><option value="ast">Asturian</option><option value="atj">Atikamekw</option><option value="av">Avaric</option><option value="avk">Kotava</option><option value="awa">Awadhi</option><option value="ay">Aymara</option><option value="az">azərbaycan</option><option value="ba">Bashkir</option><option value="bal">Baluchi</option><option value="ban">Balinese</option><option value="bar">Bavarian</option><option value="bas">Basaa</option><option value="bax">Bamun</option><option value="bbc">Batak Toba</option><option value="bbj">Ghomala</option><option value="be">беларуская</option><option value="bej">Beja</option><option value="bem">Bemba</option><option value="bew">Betawi</option><option value="bez">Bena</option><option value="bfd">Bafut</option><option value="bfq">Badaga</option><option value="bg">български</option><option value="bgc">Haryanvi</option><option value="bgn">Western Balochi</option><option value="bho">Bhojpuri</option><option value="bi">Bislama</option><option value="bik">Bikol</option><option value="bin">Bini</option><option value="bjn">Banjar</option><option value="bkm">Kom</option><option value="bla">Siksiká</option><option value="blo">Anii</option><option value="blt">Tai Dam</option><option value="bm">bamanakan</option><option value="bn">বাংলা</option><option value="bo">བོད་སྐད་</option><option value="bpy">Bishnupriya</option><option value="bqi">Bakhtiari</option><option value="br">brezhoneg</option><option value="bra">Braj</option><option value="brh">Brahui</option><option value="brx">Bodo</option><option value="bs">bosanski</option><option value="bss">Akoose</option><option value="bua">Buriat</option><option value="bug">Buginese</option><option value="bum">Bulu</option><option value="byn">Blin</option><option value="byv">Medumba</option><option value="ca">català</option><option value="cad">Caddo</option><option value="car">Carib</option><option value="cay">Cayuga</option><option value="cch">Atsam</option><option value="ccp">Chakma</option><option value="ce">нохчийн</option><option value="ceb">Cebuano</option><option value="cgg">Chiga</option><option value="ch">Chamorro</option><option value="chb">Chibcha</option><option value="chg">Chagatai</option><option value="chk">Chuukese</option><option value="chm">Mari</option><option value="chn">Chinook Jargon</option><option value="cho">Choctaw</option><option value="chp">Chipewyan</option><option value="chr">Cherokee</option><option value="chy">Cheyenne</option><option value="cic">Chickasaw</option><option value="ckb">Central Kurdish</option><option value="clc">Chilcotin</option><option value="co">Corsican</option><option value="cop">Coptic</option><option value="cps">Capiznon</option><option value="cr">Cree</option><option value="crg">Michif</option><option value="crh">Crimean Tatar</option><option value="crj">Southern East Cree</option><option value="crk">Plains Cree</option><option value="crl">Northern East Cree</option><option value="crm">Moose Cree</option><option value="crr">Carolina Algonquian</option><option value="crs">Seselwa Creole French</option><option value="cs">čeština</option><option value="csb">Kashubian</option><option value="csw">Swampy Cree</option><option value="cu">Church Slavic</option><option value="cv">чӑваш</option><option value="cwd">Woods Cree</option><option value="cy">Cymraeg</option><option value="da">dansk</option><option value="dak">Dakota</option><option value="dar">Dargwa</option><option value="dav">Taita</option><option value="de">Deutsch</option><option value="del">Delaware</option><option value="den">Slave</option><option value="dgr">Dogrib</option><option value="din">Dinka</option><option value="dje">Zarma</option><option value="doi">Dogri</option><option value="dsb">Lower Sorbian</option><option value="dtp">Central Dusun</option><option value="dua">Duala</option><option value="dum">Middle Dutch</option><option value="dv">Divehi</option><option value="dyo">Jola-Fonyi</option><option value="dyu">Dyula</option><option value="dz">རྫོང་ཁ</option><option value="dzg">Dazaga</option><option value="ebu">Embu</option><option value="ee">Eʋegbe</option><option value="efi">Efik</option><option value="egl">Emilian</option><option value="egy">Ancient Egyptian</option><option value="eka">Ekajuk</option><option value="el">Ελληνικά</option><option value="elx">Elamite</option><option value="enm">Middle English</option><option value="eo">Esperanto</option><option value="es">español</option><option value="esu">Central Yupik</option><option value="et">eesti</option><option value="eu">euskara</option><option value="ewo">Ewondo</option><option value="ext">Extremaduran</option><option value="fa">فارسی</option><option value="fan">Fang</option><option value="fat">Fanti</option><option value="ff">Pulaar</option><option value="fi">suomi</option><option value="fil">Filipino</option><option value="fit">Tornedalen Finnish</option><option value="fj">Fijian</option><option value="fo">føroyskt</option><option value="fon">Fon</option><option value="fr">français</option><option value="frc">Cajun French</option><option value="frm">Middle French</option><option value="fro">Old French</option><option value="frp">Arpitan</option><option value="frr">Northern Frisian</option><option value="frs">Eastern Frisian</option><option value="fur">Friulian</option><option value="fy">Frysk</option><option value="ga">Gaeilge</option><option value="gaa">Ga</option><option value="gag">Gagauz</option><option value="gan">Gan Chinese</option><option value="gay">Gayo</option><option value="gba">Gbaya</option><option value="gbz">Zoroastrian Dari</option><option value="gd">Gàidhlig</option><option value="gez">Geez</option><option value="gil">Gilbertese</option><option value="gl">galego</option><option value="glk">Gilaki</option><option value="gmh">Middle High German</option><option value="gn">Guarani</option><option value="goh">Old High German</option><option value="gom">Goan Konkani</option><option value="gon">Gondi</option><option value="gor">Gorontalo</option><option value="got">Gothic</option><option value="grb">Grebo</option><option value="grc">Ancient Greek</option><option value="gsw">Swiss German</option><option value="gu">ગુજરાતી</option><option value="guc">Wayuu</option><option value="gur">Frafra</option><option value="guz">Gusii</option><option value="gv">Gaelg</option><option value="gwi">Gwichʼin</option><option value="ha">Hausa</option><option value="hai">Haida</option><option value="hak">Hakka Chinese</option><option value="haw">Hawaiian</option><option value="hax">Southern Haida</option><option value="hdn">Northern Haida</option><option value="he">עברית</option><option value="hi">हिन्दी</option><option value="hif">Fiji Hindi</option><option value="hil">Hiligaynon</option><option value="hit">Hittite</option><option value="hmn">Hmong</option><option value="hnj">Hmong Njua</option><option value="ho">Hiri Motu</option><option value="hr">hrvatski</option><option value="hsb">Upper Sorbian</option><option value="hsn">Xiang Chinese</option><option value="ht">Haitian Creole</option><option value="hu">magyar</option><option value="hup">Hupa</option><option value="hur">Halkomelem</option><option value="hy">հայերեն</option><option value="hz">Herero</option><option value="ia">interlingua</option><option value="iba">Iban</option><option value="ibb">Ibibio</option><option value="id">Indonesia</option><option value="ie">Interlingue</option><option value="ig">Igbo</option><option value="ii">ꆈꌠꉙ</option><option value="ik">Inupiaq</option><option value="ike">Eastern Canadian Inuktitut</option><option value="ikt">Western Canadian Inuktitut</option><option value="ilo">Iloko</option><option value="inh">Ingush</option><option value="io">Ido</option><option value="is">íslenska</option><option value="it">italiano</option><option value="iu">Inuktitut</option><option value="izh">Ingrian</option><option value="ja">日本語</option><option value="jam">Jamaican Creole English</option><option value="jbo">Lojban</option><option value="jgo">Ngomba</option><option value="jmc">Machame</option><option value="jpr">Judeo-Persian</option><option value="jrb">Judeo-Arabic</option><option value="jut">Jutish</option><option value="jv">Jawa</option><option value="ka">ქართული</option><option value="kaa">Kara-Kalpak</option><option value="kab">Kabyle</option><option value="kac">Kachin</option><option value="kaj">Jju</option><option value="kam">Kamba</option><option value="kaw">Kawi</option><option value="kbd">Kabardian</option><option value="kbl">Kanembu</option><option value="kcg">Tyap</option><option value="kde">Makonde</option><option value="kea">Kabuverdianu</option><option value="ken">Kenyang</option><option value="kfo">Koro</option><option value="kg">Kongo</option><option value="kgp">Kaingang</option><option value="kha">Khasi</option><option value="kho">Khotanese</option><option value="khq">Koyra Chiini</option><option value="khw">Khowar</option><option value="ki">Gikuyu</option><option value="kiu">Kirmanjki</option><option value="kj">Kuanyama</option><option value="kk">қазақ тілі</option><option value="kkj">Kako</option><option value="kl">kalaallisut</option><option value="kln">Kalenjin</option><option value="km">ខ្មែរ</option><option value="kmb">Kimbundu</option><option value="kn">ಕನ್ನಡ</option><option value="ko">한국어</option><option value="koi">Komi-Permyak</option><option value="kok">Konkani</option><option value="kos">Kosraean</option><option value="kpe">Kpelle</option><option value="kr">Kanuri</option><option value="krc">Karachay-Balkar</option><option value="kri">Krio</option><option value="krj">Kinaray-a</option><option value="krl">Karelian</option><option value="kru">Kurukh</option><option value="ks">کٲشُر</option><option value="ksb">Shambala</option><option value="ksf">Bafia</option><option value="ksh">Colognian</option><option value="ku">kurdî (kurmancî)</option><option value="kum">Kumyk</option><option value="kut">Kutenai</option><option value="kv">Komi</option><option value="kw">kernewek</option><option value="kwk">Kwakʼwala</option><option value="kxv">Kuvi</option><option value="ky">кыргызча</option><option value="la">Latin</option><option value="lad">Ladino</option><option value="lag">Langi</option><option value="lah">Western Panjabi</option><option value="lam">Lamba</option><option value="lb">Lëtzebuergesch</option><option value="lez">Lezghian</option><option value="lfn">Lingua Franca Nova</option><option value="lg">Luganda</option><option value="li">Limburgish</option><option value="lij">Ligurian</option><option value="lil">Lillooet</option><option value="liv">Livonian</option><option value="lkt">Lakota</option><option value="lmo">Lombard</option><option value="ln">lingála</option><option value="lo">ລາວ</option><option value="lol">Mongo</option><option value="lou">Louisiana Creole</option><option value="loz">Lozi</option><option value="lrc">Northern Luri</option><option value="lsm">Saamia</option><option value="lt">lietuvių</option><option value="ltg">Latgalian</option><option value="lu">Tshiluba</option><option value="lua">Luba-Lulua</option><option value="lui">Luiseno</option><option value="lun">Lunda</option><option value="luo">Luo</option><option value="lus">Mizo</option><option value="luy">Luyia</option><option value="lv">latviešu</option><option value="lzh">Literary Chinese</option><option value="lzz">Laz</option><option value="mad">Madurese</option><option value="maf">Mafa</option><option value="mag">Magahi</option><option value="mai">Maithili</option><option value="mak">Makasar</option><option value="man">Mandingo</option><option value="mas">Masai</option><option value="mde">Maba</option><option value="mdf">Moksha</option><option value="mdr">Mandar</option><option value="men">Mende</option><option value="mer">Meru</option><option value="mfe">Morisyen</option><option value="mg">Malagasy</option><option value="mga">Middle Irish</option><option value="mgh">Makhuwa-Meetto</option><option value="mgo">Metaʼ</option><option value="mh">Marshallese</option><option value="mi">Māori</option><option value="mic">Mi&#039;kmaw</option><option value="min">Minangkabau</option><option value="mk">македонски</option><option value="ml">മലയാളം</option><option value="mn">монгол</option><option value="mnc">Manchu</option><option value="mni">Manipuri</option><option value="moe">Innu-aimun</option><option value="moh">Mohawk</option><option value="mos">Mossi</option><option value="mr">मराठी</option><option value="mrj">Western Mari</option><option value="ms">Melayu</option><option value="mt">Malti</option><option value="mua">Mundang</option><option value="mus">Muscogee</option><option value="mwl">Mirandese</option><option value="mwr">Marwari</option><option value="mwv">Mentawai</option><option value="my">မြန်မာ</option><option value="mye">Myene</option><option value="myv">Erzya</option><option value="mzn">Mazanderani</option><option value="na">Nauru</option><option value="nan">Min Nan Chinese</option><option value="nap">Neapolitan</option><option value="naq">Nama</option><option value="nb">Norwegian Bokmål</option><option value="nd">isiNdebele</option><option value="nds">Low German</option><option value="ne">नेपाली</option><option value="new">Newari</option><option value="ng">Ndonga</option><option value="nia">Nias</option><option value="niu">Niuean</option><option value="njo">Ao Naga</option><option value="nl">Nederlands</option><option value="nmg">Kwasio</option><option value="nn">Norwegian Nynorsk</option><option value="nnh">Ngiemboon</option><option value="no">norsk</option><option value="nog">Nogai</option><option value="non">Old Norse</option><option value="nov">Novial</option><option value="nqo">N’Ko</option><option value="nr">South Ndebele</option><option value="nso">Northern Sotho</option><option value="nus">Nuer</option><option value="nv">Navajo</option><option value="nwc">Classical Newari</option><option value="ny">Nyanja</option><option value="nym">Nyamwezi</option><option value="nyn">Nyankole</option><option value="nyo">Nyoro</option><option value="nzi">Nzima</option><option value="oc">occitan</option><option value="oj">Ojibwa</option><option value="ojb">Northwestern Ojibwa</option><option value="ojc">Central Ojibwa</option><option value="ojg">Eastern Ojibwa</option><option value="ojs">Oji-Cree</option><option value="ojw">Western Ojibwa</option><option value="oka">Okanagan</option><option value="om">Oromoo</option><option value="or">ଓଡ଼ିଆ</option><option value="os">ирон</option><option value="osa">Osage</option><option value="ota">Ottoman Turkish</option><option value="pa">ਪੰਜਾਬੀ</option><option value="pag">Pangasinan</option><option value="pal">Pahlavi</option><option value="pam">Pampanga</option><option value="pap">Papiamento</option><option value="pau">Palauan</option><option value="pcd">Picard</option><option value="pcm">Nigerian Pidgin</option><option value="pdc">Pennsylvania German</option><option value="pdt">Plautdietsch</option><option value="peo">Old Persian</option><option value="pfl">Palatine German</option><option value="phn">Phoenician</option><option value="pi">Pali</option><option value="pis">Pijin</option><option value="pl">polski</option><option value="pms">Piedmontese</option><option value="pnt">Pontic</option><option value="pon">Pohnpeian</option><option value="pqm">Maliseet-Passamaquoddy</option><option value="prg">Prussian</option><option value="pro">Old Provençal</option><option value="ps">پښتو</option><option value="pt">português</option><option value="qu">Runasimi</option><option value="quc">Kʼicheʼ</option><option value="qug">Chimborazo Highland Quichua</option><option value="raj">Rajasthani</option><option value="rap">Rapanui</option><option value="rar">Rarotongan</option><option value="rgn">Romagnol</option><option value="rhg">Rohingya</option><option value="rif">Riffian</option><option value="rm">rumantsch</option><option value="rn">Ikirundi</option><option value="ro">română</option><option value="rof">Rombo</option><option value="rom">Romany</option><option value="rtm">Rotuman</option><option value="ru">русский</option><option value="rue">Rusyn</option><option value="rug">Roviana</option><option value="rup">Aromanian</option><option value="rw">Kinyarwanda</option><option value="rwk">Rwa</option><option value="sa">संस्कृत भाषा</option><option value="sad">Sandawe</option><option value="sah">Yakut</option><option value="sam">Samaritan Aramaic</option><option value="saq">Samburu</option><option value="sas">Sasak</option><option value="sat">Santali</option><option value="saz">Saurashtra</option><option value="sba">Ngambay</option><option value="sbp">Sangu</option><option value="sc">sardu</option><option value="scn">Sicilian</option><option value="sco">Scots</option><option value="sd">سنڌي</option><option value="sdc">Sassarese Sardinian</option><option value="sdh">Southern Kurdish</option><option value="se">davvisámegiella</option><option value="see">Seneca</option><option value="seh">Sena</option><option value="sei">Seri</option><option value="sel">Selkup</option><option value="ses">Koyraboro Senni</option><option value="sg">Sängö</option><option value="sga">Old Irish</option><option value="sgs">Samogitian</option><option value="sh">srpskohrvatski</option><option value="shi">Tachelhit</option><option value="shn">Shan</option><option value="shu">Chadian Arabic</option><option value="si">සිංහල</option><option value="sid">Sidamo</option><option value="sk">slovenčina</option><option value="sl">slovenščina</option><option value="slh">Southern Lushootseed</option><option value="sli">Lower Silesian</option><option value="sly">Selayar</option><option value="sm">Samoan</option><option value="sma">Southern Sami</option><option value="smj">Lule Sami</option><option value="smn">Inari Sami</option><option value="sms">Skolt Sami</option><option value="sn">chiShona</option><option value="snk">Soninke</option><option value="so">Soomaali</option><option value="sog">Sogdien</option><option value="sq">shqip</option><option value="sr">српски</option><option value="srn">Sranan Tongo</option><option value="srr">Serer</option><option value="ss">Swati</option><option value="ssy">Saho</option><option value="st">Southern Sotho</option><option value="stq">Saterland Frisian</option><option value="str">Straits Salish</option><option value="su">Basa Sunda</option><option value="suk">Sukuma</option><option value="sus">Susu</option><option value="sux">Sumerian</option><option value="sv">svenska</option><option value="sw">Kiswahili</option><option value="swb">Comorian</option><option value="syc">Classical Syriac</option><option value="syr">Syriac</option><option value="szl">Silesian</option><option value="ta">தமிழ்</option><option value="tce">Southern Tutchone</option><option value="tcy">Tulu</option><option value="te">తెలుగు</option><option value="tem">Timne</option><option value="teo">Teso</option><option value="ter">Tereno</option><option value="tet">Tetum</option><option value="tg">тоҷикӣ</option><option value="tgx">Tagish</option><option value="th">ไทย</option><option value="tht">Tahltan</option><option value="ti">ትግርኛ</option><option value="tig">Tigre</option><option value="tiv">Tiv</option><option value="tk">türkmen dili</option><option value="tkl">Tokelau</option><option value="tkr">Tsakhur</option><option value="tl">Tagalog</option><option value="tlh">Klingon</option><option value="tli">Tlingit</option><option value="tly">Talysh</option><option value="tmh">Tamashek</option><option value="tn">Tswana</option><option value="to">lea fakatonga</option><option value="tog">Nyasa Tonga</option><option value="tok">Toki Pona</option><option value="tpi">Tok Pisin</option><option value="tr">Türkçe</option><option value="tru">Turoyo</option><option value="trv">Taroko</option><option value="trw">Torwali</option><option value="ts">Tsonga</option><option value="tsd">Tsakonian</option><option value="tsi">Tsimshian</option><option value="tt">татар</option><option value="ttm">Northern Tutchone</option><option value="ttt">Muslim Tat</option><option value="tum">Tumbuka</option><option value="tvl">Tuvalu</option><option value="tw">Twi</option><option value="twq">Tasawaq</option><option value="ty">Tahitian</option><option value="tyv">Tuvinian</option><option value="tzm">Central Atlas Tamazight</option><option value="udm">Udmurt</option><option value="ug">ئۇيغۇرچە</option><option value="uga">Ugaritic</option><option value="uk">українська</option><option value="umb">Umbundu</option><option value="ur">اردو</option><option value="uz">o‘zbek</option><option value="vai">Vai</option><option value="ve">Venda</option><option value="vec">Venetian</option><option value="vep">Veps</option><option value="vi">Tiếng Việt</option><option value="vls">West Flemish</option><option value="vmf">Main-Franconian</option><option value="vmw">Makhuwa</option><option value="vo">Volapük</option><option value="vot">Votic</option><option value="vro">Võro</option><option value="vun">Vunjo</option><option value="wa">Walloon</option><option value="wae">Walser</option><option value="wal">Wolaytta</option><option value="war">Waray</option><option value="was">Washo</option><option value="wbp">Warlpiri</option><option value="wo">Wolof</option><option value="wuu">Wu Chinese</option><option value="xal">Kalmyk</option><option value="xh">IsiXhosa</option><option value="xmf">Mingrelian</option><option value="xnr">Kangri</option><option value="xog">Soga</option><option value="yao">Yao</option><option value="yap">Yapese</option><option value="yav">Yangben</option><option value="ybb">Yemba</option><option value="yi">ייִדיש</option><option value="yo">Èdè Yorùbá</option><option value="yrl">Nheengatu</option><option value="yue">Cantonese</option><option value="za">Vahcuengh</option><option value="zap">Zapotec</option><option value="zbl">Blissymbols</option><option value="zea">Zeelandic</option><option value="zen">Zenaga</option><option value="zgh">Standard Moroccan Tamazight</option><option value="zh">中文</option><option value="zu">isiZulu</option><option value="zun">Zuni</option><option value="zza">Zaza</option></select></div>\n </li>\n <li>\n <div><button type="submit" id="post_comment_660152b8228123.78078721_submit" name="post_comment[submit]" class="btn btn__primary" data-action="subject#sendForm">Add comment</button></div>\n </li>\n </ul>\n</div>\n<input type="hidden" id="post_comment_660152b8228123.78078721__token" name="post_comment[_token]" value="70f5ac231ea0a56.TpckvME_t4HABT8iZyAxVFNLrOAmh0SKeUOrRbt2FCw.GP1c3ZRI4MuUb20WNEVwAiI747Ne4xPSLxHHBNwwW1t88B3Ljkj5sZ83dg" /></form>\n'

@TheVillageGuy
Copy link
Contributor

Can't the timestamp be fixed when it's in the future? Inconsistent yes, but what's the point of having a timestamp from the future. Maybe add a line to the post saying the timestamp was fixed?

asdfzdfj added a commit that referenced this issue Mar 25, 2024
added a cap on creation timestamp used in ranking calculation to not
exceeds the current time while performing calculation to cope with
posts' that have funny created date far into the future, also cap the
final score value to not exceed int32 max size (2**31 - 1)

the current ranking function involves using the posts' object creation
timestamp as part of the calculation, but if the datetime is too far in
the future (e.g. 4200-06-09, as seen in [this example][ex1]), it can
cause the ranking score value to exceeds the ranking score field size,
which appears to be int32 sized

technically we'll still be running into year 2038 problem on this field,
but there's some discussion on adjusting the ranking score and keep
that below int32 sized altogether, so that's left for the future exercise

also see #622 for more context

[ex1]: https://myfriendsare.gay/notice/APx5K7aeglknMfm1A0
@UmBottesWillen
Copy link
Author

Can't the timestamp be fixed when it's in the future? Inconsistent yes, but what's the point of having a timestamp from the future. Maybe add a line to the post saying the timestamp was fixed?

I was thinking about having an asterisk behind the valid timestamp, which when hovered over/clicked on, brings up a context field, reading "Alleged timestamp: [invalid timestamp]".

But I also understand that simply replacing the invalid timestamp with a valid one upon first receiving the post through federation is far easier to implement, akin to 2-3 lines of code.

@BentiGorlich BentiGorlich added enhancement New feature or request and removed bug Something isn't working labels Apr 8, 2024
@BentiGorlich
Copy link
Member

I changed the labels because the bug part of the issue has been solved by asdfzdfj

@UmBottesWillen
Copy link
Author

I changed the labels because the bug part of the issue has been solved by asdfzdfj

I'd argue that, while the change might prevent exceptions to occur, it still gives an unfair advantage to posts that have their creation date set to the future, as this fix will weight them as if they have been created right now, which still gives those posts an advantage when sorting by 'new' over regular posts. In my mind, having posts with invalid timestamps perpetually come out on top when sorting by 'new' is undesirable and therefore still a bug to the user.

@BentiGorlich
Copy link
Member

That is a 100% true 🤔

@BentiGorlich BentiGorlich added the bug Something isn't working label Apr 8, 2024
@UmBottesWillen
Copy link
Author

Unless I am mistaken about when and how often the weight for each post is (re)calculated. If the weight is calculated only when receiving the post, then this fix is fine, as the weight will never update.

@BentiGorlich
Copy link
Member

No you were right, this is a problem, because the timestamp that is supplied is used to calculate the weight (or score as it is called in the db)

Copy link
Contributor

This issue is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 6 days.

@github-actions github-actions bot added the Stale Inactivity for too long label May 29, 2024
@BentiGorlich BentiGorlich removed the Stale Inactivity for too long label May 29, 2024
Copy link
Contributor

This issue is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 6 days.

@github-actions github-actions bot added the Stale Inactivity for too long label Jul 19, 2024
@BentiGorlich BentiGorlich removed the Stale Inactivity for too long label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activitypub ActivityPub related issues backend Backend related issues and pull requests bug Something isn't working enhancement New feature or request needs feedback Requires a greater consensus to make an informed decision
Projects
Status: Backlog
Development

No branches or pull requests

3 participants