[enh] Warn user about possible security flaws when installing custom app. Fix #78

This commit is contained in:
opi 2014-10-13 16:00:30 +02:00
parent 3eea7fd634
commit 515d285d57
3 changed files with 100 additions and 91 deletions

View file

@ -926,6 +926,7 @@ app = Sammy('#main', function (sam) {
// Install custom app from github // Install custom app from github
sam.post('#/apps/install/custom', function(c) { sam.post('#/apps/install/custom', function(c) {
if (confirm(y18n.t('confirm_install_custom_app'))) {
params = { 'label': c.params['label'], 'app': c.params['url'] } params = { 'label': c.params['label'], 'app': c.params['url'] }
delete c.params['label']; delete c.params['label'];
delete c.params['url']; delete c.params['url'];
@ -1032,6 +1033,12 @@ app = Sammy('#main', function (sam) {
store.clear('slide'); store.clear('slide');
c.redirect('#/apps/install'); c.redirect('#/apps/install');
}); });
}
else {
c.flash('warning', y18n.t('app_install_cancel'));
store.clear('slide');
c.redirect('#/apps/install');
}
}); });

View file

@ -117,7 +117,8 @@
"custom_app_install" : "Install custom app", "custom_app_install" : "Install custom app",
"custom_app_url_only_github" : "Currently only from GitHub", "custom_app_url_only_github" : "Currently only from GitHub",
"confirm_install_domain_root" : "You will not be able to install any other app on %s. Continue ?", "confirm_install_domain_root" : "You will not be able to install any other app on %s. Continue ?",
"app_install_cancel" : "Installation cancelled", "app_install_cancel" : "Installation cancelled.",
"confirm_install_custom_app" : "Installing 3rd party applications may compromise the security of your system. Use at your own risks.",
"backup" : "Backup", "backup" : "Backup",
"backup_warning_title" : "The backup system is not implemented yet.", "backup_warning_title" : "The backup system is not implemented yet.",

View file

@ -116,7 +116,8 @@
"custom_app_install" : "Installer une application personnalisée", "custom_app_install" : "Installer une application personnalisée",
"custom_app_url_only_github" : "Uniquement depuis GitHub", "custom_app_url_only_github" : "Uniquement depuis GitHub",
"confirm_install_domain_root" : "Vous ne pourrez pas installer d'autres applications sur %s. Continuer ?", "confirm_install_domain_root" : "Vous ne pourrez pas installer d'autres applications sur %s. Continuer ?",
"app_install_cancel" : "Installation annulée", "app_install_cancel" : "Installation annulée.",
"confirm_install_custom_app" : "L'installation d'application tierce peut comprometre la sécurité du système. Continuer à vos risques ?",
"backup" : "Sauvegarde", "backup" : "Sauvegarde",
"backup_warning_title" : "Le système de sauvegarde n'est pas encore implémenté.", "backup_warning_title" : "Le système de sauvegarde n'est pas encore implémenté.",