summaryrefslogtreecommitdiffstats
path: root/application
AgeCommit message (Collapse)AuthorFilesLines
2016-07-14Tests: Test muser username/email verificationFlorian Pritz1-0/+56
Email verification is pretty basic since we use the framework function right now. This might change in the future. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Tests: Use muser->add_user to create test usersFlorian Pritz2-22/+12
Change the username to fit within the username restrictions. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14muser: Add add_user functionFlorian Pritz2-14/+25
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14controller/user: Use our function for email verifcationFlorian Pritz1-2/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Move username/email validation functions to muserFlorian Pritz2-29/+29
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-14Fix incorrect username validation0.9.17Florian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix missing empty lines in chromium when copying codeFlorian Pritz1-2/+6
Chromium apparently requires a <br> or some text to be present for a line to be copied to the clipboard. Firefox interprets the \n at the end as line break and copies that if there is no content. Adding an explicit <br> makes chromium work correctly, but firefox still converts the \n. Fix this by putting the \n in an HTML comment. That way the output is still somewhat readable, but both browsers do the correct thing. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix double linebreaks when copying code in firefoxFlorian Pritz1-3/+3
Apparently firefox doesn't like html code in <pre> and adds incorrect linebreaks when copying the code. This does not happen with chromium. Fix it by switching to <code> instead of <pre>. Also change the CSS to refer to the element by class instead of by type so future changes are simpler. Not sure why, but in chroium changing the container element type breaks the ordering of the lines. Adding display: table to the .code-container fixes this. References: http://stackoverflow.com/questions/24851173/why-does-text-copied-from-a-set-of-pre-tags-have-double-line-breaks#comment41552816_26408656 Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Improve insufficient permisions error messageFlorian Pritz3-3/+11
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Add site URL to authentication errorFlorian Pritz3-3/+3
This might help users if they run their own installation, but forget to set the URL in the client config and then run into this error. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Throw public exception when accessing CLI only functionsFlorian Pritz4-9/+14
We actually don't need to hide this from the user. The error should be shown rather than a blank page being returned. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13muser: Improve invalid action key error messageFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13controllers/user: Deduplicate email verificationFlorian Pritz1-5/+14
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13controllers/user: Deduplicate username verificationFlorian Pritz1-2/+15
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix missing phpdoc for \service\userFlorian Pritz1-4/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Remove incorrect TODO about $new_file being unsetFlorian Pritz1-1/+0
I think this is left over from developing the feature. This seems to have been incorrect in the inital commit of the code. Just drop it. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Fix typoFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-13Remove duplicate TODO for supporting multiple type for thumbnailsFlorian Pritz1-1/+0
Already in \libraries\Exif Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-12Fix incorrect width of thumbnail listFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-12Link single paste to autodetection in video/audio/asciinema fragemntsFlorian Pritz3-3/+3
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-12Add asciinema supportFlorian Pritz4-3/+18
This bypasses require.js for asciinema because apparently require.js can't deal with the embedded React library. The result is that React is not loaded properly and the asciinema player is unable to find it. Just load it like upstream tells you to. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-10Make delete button fixed on upload history pageFlorian Pritz3-9/+18
Also make the navigation fixed because otherwise this looks hideous and the space is already occupied anyway. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-10Fix login page being to wide on mobile devicesFlorian Pritz1-1/+1
Same fix as in 7e4912fc03111ab5071e8e7478db48422597777a. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-10Fix display issue on paste pageFlorian Pritz1-1/+1
Proper fix this time. container is not necessary here. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-10Revert "Fix display issues with new bootstrap"Florian Pritz5-5/+5
This reverts commit f0d3b633f04c9afa2237b1dad83ad8240da68b38. That commit causes breakage on the history page due to missing padding.
2016-07-04Add popover with filenames of multipaste to historyFlorian Pritz1-0/+20
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04service\files->get_multipaste_history: Add sort order from DBFlorian Pritz3-2/+18
Keep this field private for now. I may be exposed at a later time. The returned values are already normalized so they can be safely exposed. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Add function to ellipsize textFlorian Pritz2-0/+70
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Harden XSS escapingFlorian Pritz2-3/+3
This could lead to XSS if the html attribute values weren't quoted with double quotes. By default htmlentities only encodes double quotes and not single quotes. If the quotes are ever changed this could lead to exploitable XSS. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04file/history: Add support to display preview of entries on hoverFlorian Pritz2-1/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Update API v2 version info to 2.1.0Florian Pritz1-1/+1
The documentation already refers to 2.1.0 and lists a new feature of the file/history endpoint, but requests for 2.1.0 are not yet accepted because the server doesn't know that it actually supports this version. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-07-04Fix display issues with new bootstrapFlorian Pritz5-5/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-16Remove old TODOFlorian Pritz1-1/+0
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-12Switch to PHP based markdown renderer (parsedown)Florian Pritz2-4/+6
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-09Use PHP library for QR codesFlorian Pritz3-1/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-09Autoloader: Support PSR-4 style namespace/directory mappingFlorian Pritz1-8/+15
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-07file/download: Delete invalid multipastesFlorian Pritz1-0/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-07mmultipaste->valid_id: Detect empty multipastes as invalidFlorian Pritz1-0/+4
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-05config: Clarify comment about password hashing settingsFlorian Pritz1-1/+2
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-06-05Fix redirect on login after registering new accountFlorian Pritz3-1/+4
Previously the login box in the navigation would redirect to the current page, but this page will throw an error in the case of the registration page since that's the page with the invition key and that key is no longer valid. Fix this by redirecting to the $redirect_uri and ensure that this value is set for all requests. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-05-24mfile/valid_id: Remove duplicate codeFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-05-24Fix TypeError when getting thumbnail for invalid IDFlorian Pritz1-0/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01Fix typoFlorian Pritz1-1/+1
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01Support rehashing of passwords not conforming to configFlorian Pritz2-0/+7
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01muser: Add set_passwordFlorian Pritz2-4/+8
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-04-01Support changing password hashing settingsFlorian Pritz2-1/+15
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-03-29Catch potential password hashing errorsFlorian Pritz1-1/+5
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-03-29Increase size of password field in DBFlorian Pritz2-1/+28
The php documentation for password_hash recommends 255. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-03-29Use PHP's password_hash functionFlorian Pritz3-259/+2
This drops a third party library, but bumps our required php version to 5.5 which is currently old stable. Earlier versions are no longer supported by php upstream nor by us. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2016-02-26Fix MYSQL error in migration 14/15Florian Pritz2-24/+16
Error was: You can't specify target table 'testsuite_prefix_file_storage' for update in FROM clause The new code is ported from the existing postgres migration. Signed-off-by: Florian Pritz <bluewind@xinu.at>