Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
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>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Clients are only hosted on paste.xinu.at and everywhere else the links
will point to missing files so they become useless.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
The - from m-ID was missing in the regex.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Also adjust test cases to check for the new value. API v1 does not
change.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Since this is a breaking change bump the api version to 2.
The private fields are user_id and multipaste_id which where leaked via
the multipaste_items field. This commit also adds a test case to both
api versions that checks the returned fields.
NOTE: Most of this commit is copied from the files of api v1 so when
viewing the diff use --find-copies-harder for an easy to read diff.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
These are necessary for clients that want to send lots of fields e.g.
in a delete request or upload multiple files in one upload request.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
If the user has multiple tabs open, but is not logged in this will be
called multiple times (unless he logs in after the first upload batch)
and earlier uploads would be lost.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
If we store only the last called URI in the session we can't support
multiple browser tabs that all need to log in again. Fix this by
storing the URI in the URL.
Also change a trim() to ltrim() so that the URI string we store keeps
it's trailing slash.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Also try to clean up when files are deleted since 1 month is a rather
long time. Granted, thumbnails are small, but whatever
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
- Use the filedata we already have in
c/file->upload_history_thumbnails() rather than fetching it per id in
m/mfile->valid_id
- Construct the config array for s/f::valid_id only once and not for
every validation.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
The user might click the wrong link or might change their mind and it
is really not necessary to clean them up early. Let the cron job take
care of that.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This happens when an invalid lexer is used so until we use the exceptions
this should not be forbidden since we won't fall back to plain text
then.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
No need to specify the interpreter twice.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Delete files not matching our pattern and be forgiving if directories
are cleaned up by mfile->delete_data_id.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
We no longer interfere with the normal installation's database settings.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
This moves all tests into a subdirectory and lets prove itself figure
out which tests exist. It seems if you supply the testlist via
arguments or stdin --state won't affect the order.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
An assert is actually wrong for user input.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Create a testable function doing all the verification/removal, add
tests and use it for both cases.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
If we don't output a test plan prove will consider the test failed. The
destructor would run when an uncaught exception is thrown so don't use
a destructor to output the testplan.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Adds additional support for imagemagick if GD doesn't support a file
type and extends the files displayed as thumbnails to all images and
pdf files.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|