Commit Graph
15 Commits
Author SHA1 Message Date
Serene-Arc a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Adrian Sampson 1fad3d01ae aura: Sanitize filenames in image IDs
When constructing paths to image files to serve, we previously spliced
strings from URL requests directly into the path to be opened. This is
theoretically worrisome because it could allow clients to read other
files that they are not supposed to read.

I'm not actually sure this is a real security problem because Flask's
URL parsing should probably rule out IDs that have `/` in them anyway.
But out of an abundance of caution, this now prevents paths from showing
up in IDs at all---and also prevents `.` and `..` from being valid
names.
2021-11-26 15:35:07 -05:00
Andrew Rogl 1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Callum Brown a24a094562 AURA: Small updates to docs and set server version 2021-03-07 18:24:57 +00:00
Callum Brown a54ee43d57 AURA: Allow '-' character in filter attribute 2021-03-07 14:23:17 +00:00
Callum Brown 477eed3b25 AURA: Use py3_path rather than displayable_path
displayable_path may remove 'bad' characters, yielding a wrong path.

Also use track.path rather than track.destination() as that is where
the file is actually located rather than where it should be located
according to the beets path system.
2021-03-07 10:25:20 +00:00
Callum Brown 2fe2f4f31e AURA: Ensure CORS allowed origins are strings 2021-03-06 13:30:31 +00:00
Callum Brown fbc76887ad AURA: Fix styling when formatting error strings 2021-03-06 13:22:28 +00:00
Callum Brown 07cfaaa3b3 AURA: Simplify if statements
Get rid of ` is not None`
Change `len(x) == 0` to `not x`
Change `x is None` to `not x`
2021-03-06 12:44:32 +00:00
Callum Brown b1baeb37f1 AURA: replace translate_attribute with a dict.get 2021-03-06 12:08:35 +00:00
Callum Brown 7e819d2a2e AURA: Update artist-mbid attribute to use '-' 2021-03-06 12:01:02 +00:00
Callum Brown e067298224 Add default config values in create_app()
So if not run through beet aura then default values will be available
2020-10-28 18:56:45 +00:00
Callum Brown e8aa96ef72 AURA: Add argument info to docstrings
Follows the google docstring style:
https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
2020-09-27 18:58:39 +01:00
Callum Brown 51c3f310e9 AURA: Fix docstrings for tox -e lint 2020-09-27 18:09:16 +01:00
Callum Brown 5c875c50de AURA: Add aura plugin and docs 2020-09-21 20:24:41 +01:00