summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-16Fix generate_name() imaginary column "pomf" to "files"Juuso Lapinlampi
(Partially reverts commit e0bb4e0.) Actually fix generate_name() COUNT query this time. It still had an imaginary table "pomf" from e0bb4e0. Change it to "files" like in the schema. For code consistency, :filename is reverted back to :name as it was before commit e0bb4e0. That commit is bogus and doesn't fix the issue due to skipping the code review process. The problem with this COUNT query in first place was that it checked imaginary columns (name) from an imaginary table (pomf) in the database. This led to the "same filename" check not working at all, and the other code only relying on checking the same hash (currently SHA-1) for returning the filename before generate_name(). By luck, generated filenames could collide and another file of the same generated filename would be returned, discarding the new upload. I discovered this bug about a month ago myself, but back then there was no reliable way to reproduce it and no good description of the bug. This bug was introduced in commit 5b77a4e. Reported-by: Vhum Vhum <vhumvhum1@gmail.com> Suggested-by: Luminarys <luminarys@fuwa.se> OK ewhal@, luminarys@
2015-11-16Change SQL query from name to filename to resolve duplicate entries in the ↵Eliot Whalan
database
2015-11-01Revert <input type="hidden"> in upload_form_nojs.swigJuuso Lapinlampi
Hidden <input> values did not work as I expected for POST requests. In GET requests, the hidden values are added as query parameters to the URL. For POST requests, the hidden inputs are simply more form-data to upload in the POST request (another "file"). Because of this, the HTML output parameter is never passed to upload.php and so it returns the default response instead (JSON). The goal is to use the HTML response. This reverts commit d6dc103c7229cb0e2e177ce0dfc0cfb528025ca9, where the bug was introduced. OK ewhal@
2015-11-01Update package.json devDependencies (UglifyJS 2.5)Juuso Lapinlampi
Bump grunt-contrib-copy ^0.8.1 -> ^0.8.2. While this is not entirely necessary, do it anyway to keep our package.json up to date with latest releases. Bump grunt-contrib-uglify ^0.9.2 -> ^0.10.0. Updates UglifyJS dependency from ^2.4.24 -> ^2.5. May result in better, smaller or less buggy minified JavaScript, although this has not been tested. If everything goes well, this commit doesn't change anything. Carets will automatically update to latest major version. This commit just means we are showing to drop support for some older versions, despite package.json really instructing to download a newer release. OK ewhal@
2015-10-31Merge branch 'cleanup-css' of wubthecaptain/pomfJuuso Lapinlampi
Clean up CSS. Removes an off-screen content hack and removes unnecessary, dead style rules. POCKY~ rules have never seen light in the source code, not in core nor moe panel. CSS border-box vendor prefixes are long since unnecessary and border-box is supported natively by browsers. OK ewhal@
2015-10-31Merge branch 'add-git-mailmap' of wubthecaptain/pomfJuuso Lapinlampi
Add .mailmap, which is a git-shortlog(1) feature. Maps author names with different names/email addresses under one name. OK ewhal@
2015-10-30FAQ: Clarify the law enforcement may contact usJuuso Lapinlampi
The message and the results for why the law enforcement must be contacted may be unclear to some. Add "they may contact us if appropriate" to clarify the message and uphold the legal spirit, for the lack of better words.
2015-10-27Fix spelling of "ShareX" on tools pageJuuso Lapinlampi
As seen on the ShareX project's home page, the correct spelling of the name is with an uppercase `X`. On the tools page, it is incorrectly an lowercase `x` (Sharex). This corrects it.
2015-10-27Fix incorrect 404 download link to pantsu/1339secureJuuso Lapinlampi
The pantsucat/pomfsecure repository has been dead for a very long time. It is giving a "404 Not Found" error. Fix the download link to a working Git repository.
2015-10-27Update package.json name, version and descriptionJuuso Lapinlampi
- Revert project name change made in commit 0ab45bf3 back from Pantsu back to Pomf. - Change package version to 2.0.0-dev (one time early version change exception). - Change description's initial character to camelcase.
2015-10-27Revert default max-file-size from 120MiB to 10MiBJuuso Lapinlampi
ewhal@ didn't understand how changing the maximum file size works, so he edited the JavaScript code directly to set the default to his desired 120MiB. For all clones, this may not be viable and it's not a sane default in my opinion. This doesn't change the fact that the maximum file size remains to be what it's configured in the configuration (Gruntfile.js). This bug was introduced in commit ec0154b, and potentially others. Vague OK from ewhal@ many weeks ago.
2015-10-27Stop placing #upload-input off-screen, don't display itJuuso Lapinlampi
Problems with placing #upload-input off-screen is that keyboard navigation (tab) will gain focus of the upload buttons twice. Hiding the other upload button (the <input> element) off-screen makes no sense because no explanation is given. Hide it with `display: none;`. Considering screen reader users, the <button> element (with a future <label> element) should hopefully convey enough information about it's purpose. `tabindex="-1"` would be an alternative, but would require placing content off-screen.
2015-10-25Remove unnecessary CSS border-box vendor prefixesJuuso Lapinlampi
border-box has been supported natively in web browsers since Chromium 10, Firefox 29.0, Internet Explorer 8, Opera 7, Safari (WebKit) 5.1. IE never also had a vendor prefix. As a guideline, as of today Firefox ESR (extended support release) is on version 38.3.0, so native support has been available for a long while. These vendor prefixes are no longer needed. This commit removes them. For future improvement, matching this rule against wildcard `*` should be re-considered and moved to body or some other rule to avoid expensive CSS calculations.
2015-10-25Remove unused POCKY~ style rules from CSSJuuso Lapinlampi
Pomf core nor moe panel have never used these POCKY~ style rules. They have no reason to exist. Remove them for cleanup. Reported-by: Luminarys <luminarys@fuwa.se>
2015-10-25Remove commented style rules from CSS (leftovers)Juuso Lapinlampi
There are commented style rules in the CSS that do not appear to have been used in a long time, and have no reason to exist. Remove them for cleanup.
2015-10-24Merge branch 'rewrite-faq' of wubthecaptain/pomfJuuso Lapinlampi
Update the FAQ to be semantically more correct, easier to read and pretty. A lot of here applies to Pantsu.cat specifically. For future improvement, a generic FAQ may be created and this FAQ split into an extension repository (pomf-pages-pantsucat or similar). OK ewhal@
2015-10-23Add alchimist <alchimist@nwa.xyz> to Git mailmapJuuso Lapinlampi
Although alchimist has not yet merged any commits to master as of this commit, it is anticipated to happen eventually after he's done working with his branches. Regardless, adding this makes sure git-shortlog(1) will display the up-to-date email address.
2015-10-23Fix Eliot Whalan's mailmap for contact@pantsu.catJuuso Lapinlampi
Eliot has also contributed three commits with his name using contact@pantsu.cat. The match on pantsucat name is too specific. This groups those three commits to Eliot Whalan <ewahl@pantsu.cat>.
2015-10-23Create Git .mailmap for git-shortlog(1)Juuso Lapinlampi
From git-shortlog(1) man page: > The .mailmap feature is used to coalesce together commits by the same > person in the shortlog, where their name and/or email address was > spelled differently.
2015-10-22FAQ: Clarify "valid notice" with Copyright Act 1968Juuso Lapinlampi
A "valid notice" for copyright takedown is questionable and doesn't tell much of a clue what needs to be in a takedown notice. Change it to specify Copyright Act 1968 (Australia), which is the current copyright legislation in Australia. For future improvement, a copyright takedown page could be created with more detailed instructions what needs to be included in a copyright takedown notice.
2015-10-22pages: Move nav.swig includes from jumbotron to bottomJuuso Lapinlampi
nav.swig includes were inconsistently at either bottom of the page or inside the jumbotron. For FAQ, the navigation was also nested incorrectly inside the <article> element, which means the navigation incorrectly assumed to be in-article navigation (table of contents). The intention is to have these nav.swig (site-wide navigation) includes outside of <article> scope. Future improvement is desired to have all pages like other.swig and tools.swig to have <article> elements.
2015-10-22FAQ: Wrap body in <article> elementJuuso Lapinlampi
The <article> element is an element introduced in HTML5 for semantic sectioning. faq.swig is missing this semantic element, so this commit adds it. It doesn't seem appropriate to use <article> in layout.swig, because it's used for every page, also ones that are not articles. Reference: http://www.w3.org/TR/html5/sections.html#the-article-element
2015-10-22FAQ: Clarify disabling access to infringing contentJuuso Lapinlampi
The previous paragraph is misleading. On takedown notice, the intention is not to disable access to files the complainer has uploaded. This fixes the paragraph to say the intention is to disable access to infringing content.
2015-10-22Contributing: Move IRC channel to #pomfret on RizonJuuso Lapinlampi
Me and antonizoon have decided to create a new central channel for Pomf.se clone discussion. This leaves #/g/hostingtalk dedicated to its intended purpose, general server hosting discussion. The channel name #pomfret comes from ArchiveTeam's EFnet channel of the same name, which was used to rescue Pomf.se's files. The channel on EFnet is without OPs these days. antonizoon also suggested lots of imageboard/chan channels are also on Rizon, so Rizon was chosen for the channel as a good fit. Rizon also houses the #bibanon channel, which is the official channel for Bibliotheca Anonoma. OK ewhal@
2015-10-21Remove banners include from FAQ pageJuuso Lapinlampi
The banner in FAQ seems out of place and doesn't really belong to the page. This commit removes the banners from faq.swig. The banners are still kept on the index page.
2015-10-21Rewrite the FAQ page with better text and semanticsJuuso Lapinlampi
The previous FAQ is difficult to read and doesn't actually answer to common questions. It also lacks semantics. Because the previous FAQ had reached a point of being next to useless and unfixable with minor edits, it had to be rewritten. This commit addresses the most commonly asked questions. It uses HTML5 headings for addresssing each question for proper document outline. For future improvement, more may be added as necessary.
2015-10-21Add <abbr> element to FAQ page heading level 1Juuso Lapinlampi
FAQ itself as a word as unsemantic to screen readers and not accessible. Adding an <abbr> element improves accessibility and makes screen readers read the title correctly.
2015-10-19Remove Peter Lejeck from upload_form_nojs.swig authorsJuuso Lapinlampi
Peter didn't actually write this piece of Swig template, and there's an insignificant amount of templating code that could have been written by him. We can remove him from this template's authors.
2015-10-18Add "Demo" subheading under "Features" in README.mdJuuso Lapinlampi
The link to real world example at Pantsu.cat is not semantically a feature, but its own demonstration. Adding a subheader for the example increases semantics further, and makes it easier to find.
2015-10-18Add "Features" section to README.mdJuuso Lapinlampi
The README.md lacks a features section, which is worthful for those searching for a suitable file sharing platform to host. This change lists the features and seperates "Requirements" to its own section. Worthy read: "How to Write a Readme Worth Reading" by Diana Thayer. https://orchestrate.io/blog/2014/07/16/how-to-write-a-readme-worth-reading/
2015-10-15Fix npm install build failure, remove extra commaJuuso Lapinlampi
This bug was introduced in previous commit 566611c.
2015-10-15Remove Catalan pages/translationsJuuso Lapinlampi
This is not the right way to do i18n. Banners are difficult and buggy with translations, the folder structure is wrong and the result is duplicated markup. For the sake of maintainability, I am liberally removing this from core. Future i18n attempts should use real gettext implementations and possibly seperate i18n files from core as an extension. Because Cupkle contributed the Catalan translation, this also removes him/her from contributors.
2015-10-14Tweak .alert-info color to satisfy WCAG 2.0 contrastJuuso Lapinlampi
WCAG 2.0 section 1.4.3 sets certain criteria for foreground/background color contrast ratio. The current contrast ratio is too low at 4.00, where the desired contrast ratio is at least 4.50. This commit changes the contrast ratio to the minimum required to fulfill the WCAG 2.0 section 1.4.3 criteria. Previously this was partially addressed in commit 6915a50, which neku forgot to attribute to my name. Reference: http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
2015-10-14Remove unused grunt-mkdir taskJuuso Lapinlampi
This does nothing as far as I see it, no dist/img/ is created. And hey, it works without it. grunt-contrib-copy can create directories for us.
2015-10-14Add img/ to Gruntfile copy taskJuuso Lapinlampi
Grunt would not copy `img/` to `dist/img/`, because the task of copying images was previously on the now-removed imagemin task. This bug was introduced in commit 90e6b7b.
2015-10-13Remove grunt-contrib-htmlmin HTML minificationJuuso Lapinlampi
The benefits of HTML minification are too small and outweighted by the benefits of not having to deal with yet another dependency in Pomf's code. `Vary: Accept-Encoding` on the server is the recommended way to approach this, also for clarity and debugging without browser consoles. We don't need this.
2015-10-13Remove grunt-contrib-imagemin image minificationJuuso Lapinlampi
Ever since liberating images in c76f70c, there's no really a need to minify images. Furthermore, the dependency update in 6ef710a changed PNG minification to be lossless, so most of the benefits were lost (because our images are already compressed in the repository). We don't need this anymore.
2015-10-13Remove all JSHint tools and headersJuuso Lapinlampi
JSHint is "deprecated" in favor of ESLint. Personally I have not used JSHint ever since switching to ESLint. Vague OK from ewhal@
2015-10-11Pretty print JSON responsesJuuso Lapinlampi
To understand and document the API, responses should be correct, accurate and human readable. Server-side compression (gzip) will compensate for the extra whitespace. OK ewhal@
2015-10-10Merge branch 'improve-readme' of wubthecaptain/pomfJuuso Lapinlampi
Adds "Contributing", and "Credits" sections. Rewrites "Configuring". Replaces "Contact" with "Getting help". OK alchimist@
2015-10-10Fix README.md grammarJuuso Lapinlampi
Thanks to alchimist@ for doing editorial review.
2015-10-09Rewrite "Configuring" section to be more confidentJuuso Lapinlampi
The previous example can create a feeling of worry in the mind of the reader. This will aim to fix that.
2015-10-09Clarify IRC usage for contribution merge requestsJuuso Lapinlampi
We use IRC for code review, so naturally merge requests also happen there.
2015-10-09Linkify git.pantsu.cat in README.mdJuuso Lapinlampi
2015-10-09Add "Contributing" section to README.mdJuuso Lapinlampi
Worthy read: "Top ten reasons why I won’t use your open source project" by Adam Stacoviak. https://changelog.com/top-ten-reasons-why-i-wont-use-your-open-source-project/
2015-10-09Replace Pomf.se HTTPS link to HTTP in README.mdJuuso Lapinlampi
It seems neku doesn't have a working HTTPS website anymore. It certainly used to.
2015-10-09Add "Credits" section to README.mdJuuso Lapinlampi
2015-10-09Replace "Contact" section with "Getting help"Juuso Lapinlampi
This also adds a mention of the IRC channel. Worthy read: "Readme Driven Development" by Tom Preston-Werner: http://tom.preston-werner.com/2010/08/23/readme-driven-development.html
2015-10-07Update gyazowin tool author contact to @4vailJuuso Lapinlampi
Fixes a dead link.
2015-09-28Merge branch 'fix-eslint-warnings' of wubthecaptain/pomfJuuso Lapinlampi
Before this merge, ESLint reported about 114 problems (76 errors, 38 warnings). This merge reduces that to about 67 problems (29 errors, 38 warnings) using Airbnb ES5 config. OK ewhal@