Please use this thread to report bugs and give feedback. Or start a new thread for more active discussion.Feel free to also report issues directly on our GitHub:https://github.com/4taba/4taba
How long? How long?How long must Wriggle suffer?
I don't know. Why is Wriggle suffering?
>bothering to sage when everyone on /all/ can read your post anyway
I get an error 500 when I try to post webms.
Trying with a mp4
Or maybe it was the webm that had a problem, I dunno.
Page refresh on posting only works with javascript enabled:<!DOCTYPE HTML><html><head><meta charset="utf-8"><script>function redirect(){window.location.replace("/test/39");}</script></head><body onload="redirect()"><h1>Post submitted successfully...</h1></body></html>Instead, you could use a HTML equivalent (https://www.w3.org/TR/WCAG20-TECHS/H76.html):<!DOCTYPE HTML><html><head><meta charset="utf-8" http-equiv=refresh content="2;URL=/test/39"/></head><body><h1>Post submitted successfully...</h1></body></html>The number before ";URL" is the amount of seconds you want that page to show up for. You could set it to "0" and if the database is fast enough it'd pretty much be seamless, but I like the charm of those refresh messages. The second page is also 49 bytes shorter, if you care about that sort of thing.
^ I just got an "ERR_BLOCKED_BY_XSS_AUDITOR" posting that, probably just another webengine oddity.
>>173Fixed, thanks for the suggestion.>>174Could be, all the search results I see for that error mention chrome. Another possibility is cloudflare doing something. Sometimes they block certain certain posts to protect their users I guess. A while ago it was impossible to post the text "/etc/hosts", but it looks like they allow it now.
Add RSS
RSS sounds fun. I've seen it on some textboards and it's cool to have if you're not in the habit of visiting 15 different websites every day.
>>174[code]test
>>178test
>>160How do I do this? Like this poster's "nice" subpost/reply?
>>181I don't understand your confusion. The post you're linking to is literally the answer to your question.
I hadn't even read the post, I just replied to the first one I saw with a "nested" reply. Thanks, man.
>Error: File decompresses to larger than the maximum filesize. Please fix your zip file and try again.?????The file in question's 5.66mb. A 7z version I couldn't upload was 1.45mb.
>>183That's the decompression bomb detection. For example, according to wikipedia it's possible to create a 42 kilobyte zip file that decompresses to 4.5 petabytes, so I don't think disabling it is acceptable.But maybe it isn't completely accurate for certain kinds of zip files? Would you mind uploading it somewhere else and posting a link so I can take a look at it?
Decompressed size is ~30mb: https://0x0.st/zycB.zipSo how about the 7z file, do you need to add the MIME to some kind of list?
>>185Well that explains it then. I don't know any imageboard that allows 30mb uploads.Just double checked and the max size allowed here is 12mb, that includes the total final decompressed size of zips.I'm open to discussion on raising the max size, but I think 12mb is already pretty big.
Personally I think it'd be better not to do any kind of filechecking, it's just not the admin's responsibility and it gets in the way. As long as a file takes virtually nothing to keep on the server, and it's nothing inherently illegal, then it should be allowed to stay.
>>187That has nothing to do with file size though. What if I just let someone upload a 20GB file? Then there's 0 disk space left on the server.
There should be a no images subdomain or directory, sometimes I want to scroll /all/ without octopus rape and toddlerkon, as much as I enjoy it.
>>188I think he meant checking the extension and file header for upload to allow only images. There are problems you run into if you allow just any kind of file willy nilly. I don't think you could run into too many problems by allowing text files if you had reasonable file size restrictions though.
>>190What I was getting at was that any file should be allowed as long as it's small enough, but I guess he's got to check that there's no child pornography or anything and unpack them.
>>191Oh no, any file is already allowed inside the zip archives. It doesn't do any checking or modification of those files other than to detect the overall filesize before unpacking, and it needs to have a "main.html" file to act as the entry point when someone clicks the thumbnail.Those are the only requirements.I'm a bit undecided about what's best though. We used to allow any file upload whatsoever regardless of type. I disabled that in the last update but I think I want to go back to it.I may just add some warning at the top of the page that says files are unmodified and file extensions can't be trusted, download at your own risk or something.
>>192Why does the site unpack the file?
>>193You know we're using zip files specifically for flash-like HTML5 applications here right?If it doesn't unpack it then it can't use it. For example:http://4taba.net/res/brd/f/32/1500097836827/There's no way to do that without unpacking it.
>>193>>194Sorry if I just assumed you knew that already. Your questions make perfect sense now.Obviously there would be no checks for final unpacked size if it weren't for this.You could use other archive types and it won't do any checks on it (as long as the archive itself is 12mb or less).Perhaps we could use the ".html5" extension specifically for zip files that you want to be unpacked (literally just zip files renamed to .html5) but if you leave the extension as ".zip" then it won't unpack it?That would be a good compromise.Also I think after the last update there's a bug right now where the site doesn't allow filetypes it can't detect. If someone sees that let me know and I'll try and fix it soon.I'm working on a totally new codebase for the site right now, so the new one definitely will allow any filetypes to be uploaded.
>>195So you like upload websites through zips? That's pretty weird. You should probably use some checkbox for that next to the upload button or something.
>>196It's supposed to be a sort of replacement for flash which is dying. Adobe isn't even going to be updating it anymore.If you can think of a better way I'm all ears. Flash lets people upload a bunch of resources in 1 file and runs an application. The only way I can think to simulate that is by uploading an archive with a standard main.html entry point.It's worked fairly well so far for those who've used it.A checkbox is probably unnecessary if I just change it to require a ".html5" extension. Nobody will have files with that extension unless the intend to upload it for this special purpose.I wonder if a different archive type would be better though. I think zip has problems with character encodings. .tar.gz is good but I don't know if windowsfags will have a tool for that. Maybe 7z?
>>1977z can do .tar.gz just fine.
>>197Bad wording on my part. Windows has 7zip, which can do .tar.gz too.
I noticed that on /f/ the urls don't link to the files anymore, just a page where the flash is embedded. This makes it difficult to download anything from there.
>>200I'm not seeing it. All files on 4taba are given new, somewhat inconvenient extensionless filenames. Are you sure it's not that?
>>201Oh you're right. My browser was simply insisting that they were "htm" files because I didn't add the extension on download.
>>202The new update to the site will restore the file extensions.
>>203What about the filenames? Are the hashes needed for the board to work? I know 8ch does this thing where they have hash filenames server-side, but saving the image would give you the filename in the download by default.
>>204The filenames have always been preserved in the database, so that's something that could be done if enough people want it. But timestamps also have some advantages, such as no naming conflicts when you save something, and they're also fairly standard across imageboards.
>>205It's mostly standard to preserve file names for flash files on imageboards. You want to keep those because opening up a bunch of flash files is tedious when you're looking for a specific one; nobody is going to memorize a bunch of timestamps and there obviously isn't a way to easily get thumbnails for them.
>>206How would duplicate file entries be handled anyway? Files are saved in per-thread directories, so I guess you could just say no files in the same thread can have the same name, and throw an error otherwise.Anyway, I think I'm just going to leave the current method as is until after the update at least. It's probably not a good idea to change code vital to serving files when we're so close to switching the site to a completely new codebase. There's probably going to be enough bugs already without file naming complications.But this idea is something that can always be implemented at any time in the future.
>>207>Files are saved in per-thread directories, so I guess you could just say no files in the same thread can have the same name, and throw an error otherwise.4chan does this but the directory is the board. Other chans do it differently, especially because they have threads where you can post flashes inside them. I've seen one that associated the filenames as secondary information while still using timestamps to keep different files around, I don't know how though.
>>208>I've seen one that associated the filenames as secondary information while still using timestamps to keep different files around, I don't know how though.I'd guess it saves the files with timestamps but lets the users request files with the filename, then it looks up the name in the database to get the timestamp and serves the file that way. But of course your browser doesn't know any of that happens and it just thinks it access the filename.That's doable. The best way to implement that would probably be to have file links include the post number, that way the database doesn't have to search for the filename and won't hit any conflicts.Now that I think about it it would be pretty easy.
>>209https://www.w3schools.com/TAGS/att_a_download.aspMaybe this will work? download="actual_filename.xxx"
It works here:https://www.w3schools.com/TAGS/tryit.asp?filename=tryhtml5_a_download2But it doesn't work with my own test, weirdly enough:data:text/html;,%3Ca%20href=http://4taba.net/res/brd/meta/81/1526188409147%20download=%22new%204taba.png%22%3Enew%204taba.png%3C/a%3EI don't know if it's because I'm linking an external site, or maybe it'll only work on a thumbnail or something (that'd be pretty weird).
Nevermind, it works. Only when I right-click and select "Save Link", not when I use this browser's built-in downloader.
>>212I can only assume that you haven't put those changes through yet. As one example, https://22chan.org/f/ appends "&=FILENAME" to the end of each file. That might work as a quick and dirty solution, which isn't required here, but you might want something more elegant.
>>210>>211Actually that makes me think that we could do both. Since setting that download attribute seems to prevent it from opening the image for viewing inside the browser itself anyway, we could make it so that clicking the thumbnail will open the image inside the browser as normal, but clicking on the filename link above the thumbnail could have the download="actual_filename.jpg" attribute.If that works then that's an easy 10 second fix. I'll do some testing with a few different browsers and if it works then I'll add it to the new server.By the way, the new site is basically ready to deploy. But I'm also switching hosts from A2 to DigitalOcean (which has more up-to-date servers, A2 is still using kernel version 2 on their VPS's), so the site may go down some time tonight or tomorrow, and be off for several hours as I move all the data to the new server and update the DNS info.
>we could make it so that clicking the thumbnail will open the image inside the browser as normal, but clicking on the filename link above the thumbnail could have the download="actual_filename.jpg" attribute.That sounds good, it would've been bad if you couldn't expand the thumbnails anymore. I don't think left-clicking on a normal link will download it, so this is basically the way it'll be in the end.>click on thumbnailMedia expands.>(middle) click on link, middle click on thumbnailMedia opens in new tab. (non-original filename if user saves here)>right click → save on linkImage saves with filename.
>>213>"&=FILENAME"meant "&name=FILENAME"