Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.3.1 update #809

Merged
merged 69 commits into from
Apr 1, 2023
Merged

v4.3.1 update #809

merged 69 commits into from
Apr 1, 2023

Conversation

Tzahi12345
Copy link
Owner

@Tzahi12345 Tzahi12345 commented Jan 3, 2023

Looks ready for release, leaving this up for a couple days before merging! See details below:

New UI:

image

New filters demo:

YoutubeDL-Material.-.Google.Chrome.2023-01-03.02-31-48.-.Trim.mp4

Notifications:

image

Tzahi12345 and others added 30 commits July 6, 2022 23:31
Expanded widths of inputs on login page to 100%
Various style improvements

Updated translations
Moved file filter options above the list of files, and added option to filter for favorites
- removed title
- added logo which navigates users home
- removed blue color
Added notifications for tasks
Added support for task errors

Added support for lt, gt etc. db comparisons

Added task to delete old files
@BillSobel
Copy link

Here is an example channel that crashes the app by causing the runaway download issue (memory goes up to the max, then the app crashes and restarts)

https://www.youtube.com/@joeeasygo

@@ -1526,20 +1511,69 @@
});
});

app.post('/api/getArchives', optionalJwt, async (req, res) => {

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
}

});

app.post('/api/importArchive', optionalJwt, async (req, res) => {

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
});
});

app.post('/api/deleteArchiveItems', optionalJwt, async (req, res) => {

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
backend/app.js Outdated
Comment on lines 1563 to 1575
app.post('/api/deleteArchiveItems', optionalJwt, async (req, res) => {
const uuid = req.isAuthenticated() ? req.user.uid : null;
const archives = req.body.archives;

let success = true;
for (const archive of archives) {
success &= await archive_api.removeFromArchive(archive['extractor'], archive['id'], archive['type'], uuid, archive['sub_id']);
}

res.send({
success: success
});
});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
Comment on lines +1514 to +1528
app.post('/api/getArchives', optionalJwt, async (req, res) => {
const uuid = req.isAuthenticated() ? req.user.uid : null;
const sub_id = req.body.sub_id;
const filter_obj = {user_uid: uuid, sub_id: sub_id};
const type = req.body.type;

// we do this for file types because if type is null, that means get files of all types
if (type) filter_obj['type'] = type;

const archives = await db_api.getRecords('archives', filter_obj);

res.send({
archives: archives
});
});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
Comment on lines +1547 to +1561
app.post('/api/importArchive', optionalJwt, async (req, res) => {
const uuid = req.isAuthenticated() ? req.user.uid : null;
const archive = req.body.archive;
const sub_id = req.body.sub_id;
const type = req.body.type;

const archive_text = Buffer.from(archive.split(',')[1], 'base64').toString();

const imported_count = await archive_api.importArchiveFile(archive_text, type, uuid, sub_id);

res.send({
success: !!imported_count,
imported_count: imported_count
});
});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
Comment on lines 1530 to +1545
app.post('/api/downloadArchive', optionalJwt, async (req, res) => {
let sub = req.body.sub;
let archive_dir = sub.archive;
const uuid = req.isAuthenticated() ? req.user.uid : null;
const sub_id = req.body.sub_id;
const type = req.body.type;

let full_archive_path = path.join(archive_dir, 'archive.txt');
const archive_text = await archive_api.generateArchive(type, uuid, sub_id);

if (await fs.pathExists(full_archive_path)) {
res.sendFile(full_archive_path);
if (archive_text !== null && archive_text !== undefined) {
res.setHeader('Content-type', "application/octet-stream");
res.setHeader('Content-disposition', 'attachment; filename=archive.txt');
res.send(archive_text);
} else {
res.sendStatus(404);
res.sendStatus(400);
}

});

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
@Tzahi12345 Tzahi12345 marked this pull request as ready for review March 27, 2023 23:45
…e subscription component (#851)

Fixed an issue where a sub would get stuck in the downloading state

Fixed UI bug in the subscriptions component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment