-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Update settings_backup.php #852
Conversation
Backup and restore from the backup menu. Add backups folder into the uploads, so the backup path will be uploads/backups https://www.veed.io/view/5bc75a75-9af6-4fc4-a462-6a161c8b9c23?panel=share
settings_backup.php
Outdated
// Implement delete selected logic here | ||
if (isset($_POST['selectedBackups'])) { | ||
foreach ($_POST['selectedBackups'] as $selectedBackup) { | ||
unlink($backupFolder . $selectedBackup); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have no idea what this means
settings_backup.php
Outdated
$selectedBackup = $_POST['proceed-restore']; | ||
|
||
$sqlFile = $backupFolder . $selectedBackup; | ||
$sqlContent = file_get_contents($sqlFile); |
Check failure
Code scanning / SonarCloud
I/O function calls should not be vulnerable to path injection attacks High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, not sure what this means
Test these changes at: https://patch14852.pr-review.itflow.org |
auch, not sure about the security there, but if one of you guys can have a look at it, please do so, thank you! |
you`ll need to create backups folder inside uploads so path will be uploads/backups. test it locally first :D |
Ah okay. Is there a way we can do that within the page itself, possibly with Also, is |
not sure the best approach ( folder structure and security wise), that's why i've asked for second opinion :D i've done the script locally, test it and works. now, going from this, sure, we can make it much better, at least we have a base to work from. still need to figure out the restore from file aspect, which should be another modal uploading file and restore script to handle that file. But with baby steps, and all the great minds, we`ll get there :D |
create backups folder in /uploads folder if not exists create backups and restore
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
Backup and restore from the backup menu. Add backups folder into the uploads, so the backup path will be uploads/backups
https://www.veed.io/view/5bc75a75-9af6-4fc4-a462-6a161c8b9c23?panel=share