| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Present the tags listing (i.e. the entries of the by-tags directory)
in alphanumerical sort order to make it easier for the user to locate
a particular tag they're looking for.
|
|
|
|
|
|
| |
The previous commit forgot to calculate details URLs on search result
pages, so an undefined local variable caused the search result pages
to break.
|
|
|
|
|
|
|
| |
In addition to the download link, we now provide a separate "details"
page for each data store object. It shows a highlighted list of
user-configurable "important" properties as well as a list of all
other properties.
|
|
|
|
|
|
|
| |
For some use cases, the API consumer needs to build paths relative to
an emulated file system object. Make the nesting level we already keep
internally public so the caller can construct relative paths to the
root.
|
| |
|
|
|
|
|
|
|
|
| |
Despite having internal locking, python-dbus / libdbus apparently
isn't thread-safe. All current data store implementations are
single-threaded anyway, so just guard all data store accesses (which
happen via D-Bus) with a (single) lock to prevent multiple D-Bus calls
being invoked in parallel.
|
|
|
|
|
| |
Use xdg.Mime and xdg.BaseDirectory instead of sugar.mime so we don't
depend on sugar-base.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a simple search field accepting Xapian queries. The actual search
is done by fsemulation in SearchResultDirectory which will merge the
user-provided query with the root query securely.
The SearchResultDirectory doesn't persist across queries and PyWebDAV
doesn't allow us to add custom response headers to relay the object
title as filename. In order to provide a user-friendly name to the
browser for saving the file and yet identify the entry uniquely, we
encode both the title and the object id in the URL for each search
result.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When merging the root query with a user-provided Xapian query, special
care must be taken. Asymmetric parentheses inside the user-provided
query can close outer parenthesis used for logically combining the two
queries, while still resulting in a valid query overall. Explicitly
check that the parenthesis are well-balanced inside the user-provided
query before using it.
This is a security fix, but as the search functionality isn't exposed
in journal2webdav so far there's no impact for any user.
|
|
|
|
|
| |
Add optional HTTPS support, including client certificate
support. Configured using command line options.
|
| |
|
|
|
|
|
|
| |
Squelch pychecker warnings by adding explicit hints. Some are for
issues in code we copied from PyWebDAV, others are for cases where
pychecker isn't smart enough.
|
| |
|
|
|
|
|
|
| |
Factor out a generic BufferResource from ObjectListHtmlResource and
add support for including a footer in the HTML (to be used by search
support later).
|
|
|
|
|
| |
PyWebDAV internally makes some assumptions that are only true if we're
an HTTP/1.1 server. So just turn us into one; it shouldn't hurt.
|
|
|
|
|
|
| |
If the object id is invalid (i.e. the data store object doesn't exist
at all or isn't exported), fsemulation will raise a ValueError rather
than IOError.
|
|
|
|
|
|
|
|
|
|
| |
Add support for exporting arbitrary search results as a directory. The
directory can be requested using the new API FSEmulation.search() and
will expect to live directly below the root directory (for symlinking
purposes).
Like with all other directories, the root query will be taken into
account.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_matches_root_query() was meant to verify that a requested entity has
actually been exported by the user (using root_query). But in order to
do that, a lot of the matching functionality in the data store
(usually implemented using Xapian) would have to be duplicated for any
except the most basic export selections to work. E.g. exporting based
on tags needs to work on parts (words) of a single value, rather than
an exact match on the full string.
Instead, let the data store do the verification by using its searching
API even if we already know the object id. There's some performance
impact to this, but it's not clear a reasonably functional
_matches_root_query() would be much faster.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a work-around for compatibility with HTTP/1.0 clients that don't
have persistent connections support and expect the connection to be
closed by the server.
Fix up the work-around for the <allprops/> response with depth!=0. It
was returning 404 for properties that are on _some_ resource, but not
the current one.
Make the work-arounds conditional, so we can deactivate them for
upstream versions that have the bugs fixed already. Otherwise we risk
breaking with future upstream versions that change implementation
details.
|
|
|
|
|
|
|
|
|
|
|
| |
pywebdav was restructed in 0.9.8. Try the new names first and fall
back to the old ones.
Also adjust a few places where compatibility was broken by upstream
without notice.
While we try to retain compatibility with previous versions of
pywebdav, this was only tested with pywebdav 0.9.8.
|
|
|
|
|
|
| |
Setting ctime and mtime on object symlinks to the values of the object
itself enables sorting directories of symlinks (e.g. by-title)
by time.
|
|
|
|
|
|
|
| |
Override the PROPS dictionary from dav_interface to remove the properties
that we don't support because they're not applicable or impossible to
determine. This fixes 404 Not Found errors being returned for a proper
request from a client.
|
|
|
|
|
| |
Output (rather minimal) HTML listings for directories if they're accessed via
GET. This allows regular web browsers to browse a journal2webdav server.
|
| |
|
|
|
|
|
|
| |
It's in WikiCreole [1] format.
[1] http://wikicreole.org/
|
|
|
|
| |
Add a standard interface for easy installation of journal2webdav.
|
|
|
|
|
| |
Previously the user had to hack journal2webdav.py to adjust these, making
updates more cumbersome than necessary.
|
|
|
|
|
| |
The root query is used to restrict the file system view to a certain subset of
the data store.
|
|\
| |
| |
| |
| |
| | |
* datastore-fuse/master: (2 commits)
fsemulation: add support for by-tags
fsemulation: Fix '.' and '..' directory entries
|
| |
| |
| |
| |
| | |
Add (resp. bring back, in the case of datastore-fuse) support for listing
data store entries by tag (still just a single tag, not recursive).
|
| |
| |
| |
| |
| |
| | |
When using generators, we can't simply call the parent method. Instead we
need to iterate over the iterator it returns and yield each entry
individually.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While FSEmulation does not support by-tags yet (a regression from current
datastore-fuse functionality), both projects will be easier to maintain
once they share a common implementation (with sufficiently abstract API)
of the file system emulation "glue code".
As the overhead of moving fsemulation.py to a new package is rather high,
the file will be carried by both projects for now and merged manually
whenever it makes sense (potentially on every commit).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FUSE doesn't like getting passed unicode strings; it does strange things like
ignoring readdir() results that are unicode strings.
We encode them as UTF-8. Arguably we should use the current locale charset
instead, but that would mean we have to deal with unencodable characters.
People just just move on and enter the Unicode world instead of relying on
legacy encodings. And at least Sugar is as broken as we are in this
respect. ;)
|
| |
| |
| |
| |
| | |
For good measure. It does not seem to be actually required for readdir()
results, but at the very least is useful for documentation purposes.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When using generators, we can't simply call the parent method. Instead we
need to iterate over the iterator it returns and yield each entry
individually.
Also fixes a missing assignment.
|
| |
| |
| |
| |
| |
| | |
Unlike sugar-datastore 0.84+, gdatastore currently returns properties as the
same type they were sent when saving, rather than converting them all to
strings. This means the timestamp property can be of a numeric type.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
FUSE doesn't like files getting replaced by symlinks upon creation, so
we need to put the "files" in the place where the user can create new
entries.
|
| | |
|
| | |
|