de_DE wouldn't update without returning errors if it was the selected language.

Also security updates
This commit is contained in:
Squidly271 2021-08-21 20:53:30 -04:00
parent 7907ab4cc7
commit d78a4f3a44
4 changed files with 14 additions and 8 deletions

View File

@ -1845,7 +1845,7 @@ function updateLanguage(language) {
$(".tooltipstered").tooltipster("hide"); $(".tooltipstered").tooltipster("hide");
disableSearch(); disableSearch();
openBox('/plugins/community.applications/scripts/languageInstall.sh&arg1=update&arg2='+language,"<?tr('Update Language Pack')?>",600,900,true,"refreshDisplay"); openBox('/plugins/community.applications/scripts/languageInstall.sh&arg1=update&arg2='+language,"<?tr('Update Language Pack')?>",600,900,true,"window.location.reload");
} }
function removeLanguage(language) { function removeLanguage(language) {
openBox('/plugins/community.applications/scripts/languageInstall.sh&arg1=remove&arg2='+language,"<?tr('Remove Language Pack')?>",600,900,true,"refreshDisplay"); openBox('/plugins/community.applications/scripts/languageInstall.sh&arg1=remove&arg2='+language,"<?tr('Remove Language Pack')?>",600,900,true,"refreshDisplay");

View File

@ -1,7 +1,7 @@
767d6f2203fed9541daeb57bbf7b58b3 ./Apps.page 767d6f2203fed9541daeb57bbf7b58b3 ./Apps.page
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page 83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
2cdb7da0d67a11278ada7fd029707738 ./ca_settings.page 2cdb7da0d67a11278ada7fd029707738 ./ca_settings.page
09b5ef42448cc280f279296e4fcbb05a ./CommunityApps.page ba02e0b349a7974c1c9e38eeaf7e4f4d ./CommunityApps.page
7c88ace586933a4a60b0ef2f8a97a662 ./default.cfg 7c88ace586933a4a60b0ef2f8a97a662 ./default.cfg
4344942541019c3b5464d508c7f0dd30 ./images/community.applications.png 4344942541019c3b5464d508c7f0dd30 ./images/community.applications.png
6e48a62b91bdd066f023f46c6b491afd ./images/discord-azure.svg 6e48a62b91bdd066f023f46c6b491afd ./images/discord-azure.svg
@ -9,7 +9,7 @@
6e48a62b91bdd066f023f46c6b491afd ./images/discord-gray.svg 6e48a62b91bdd066f023f46c6b491afd ./images/discord-gray.svg
8e7dc33512b8a78f28d7179a972c7c34 ./images/discord-hover.svg 8e7dc33512b8a78f28d7179a972c7c34 ./images/discord-hover.svg
54e46db492ddb033dfeb2827c5efd4a8 ./images/discord-white.svg 54e46db492ddb033dfeb2827c5efd4a8 ./images/discord-white.svg
9ef84ddf9cb08272cfbaeed5c08fcb43 ./include/exec.php 5aa58127b80715b769bcfd4634b89f34 ./include/exec.php
00068044737bb1c08f2c0bad98b97646 ./include/helpers.php 00068044737bb1c08f2c0bad98b97646 ./include/helpers.php
3893704ad833c765384c5fcf3147a7f7 ./include/paths.php 3893704ad833c765384c5fcf3147a7f7 ./include/paths.php
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js

View File

@ -1182,10 +1182,11 @@ function previous_apps() {
# Removes an app from the previously installed list (ie: deletes the user template # # Removes an app from the previously installed list (ie: deletes the user template #
#################################################################################### ####################################################################################
function remove_application() { function remove_application() {
$application = getPost("application",""); $application = realpath(getPost("application",""));
if ( pathinfo($application,PATHINFO_EXTENSION) == "xml" || pathinfo($application,PATHINFO_EXTENSION) == "plg" ) if ( ! (strpos($application,"/boot/config") === false) ) {
@unlink($application); if ( pathinfo($application,PATHINFO_EXTENSION) == "xml" || pathinfo($application,PATHINFO_EXTENSION) == "plg" )
@unlink($application);
}
postReturn(['status'=>"ok"]); postReturn(['status'=>"ok"]);
} }
@ -1408,6 +1409,11 @@ function removePrivateApp() {
postReturn(["error"=>"Something went wrong-> not an xml file: $path"]); postReturn(["error"=>"Something went wrong-> not an xml file: $path"]);
return; return;
} }
$path = realpath($path);
if ( strpos($path,"/boot/config/community.applications") !== false ) {
postReturn(["error"=>"Path not contained within /boot/config/community.applications"]);
return;
}
$templates = readJsonFile($caPaths['community-templates-info']); $templates = readJsonFile($caPaths['community-templates-info']);
$displayed = readJsonFile($caPaths['community-templates-displayed']); $displayed = readJsonFile($caPaths['community-templates-displayed']);
foreach ( $displayed as &$displayType ) { foreach ( $displayed as &$displayType ) {
@ -1675,7 +1681,7 @@ function remove_multiApplications() {
return; return;
} }
foreach ($apps as $app) { foreach ($apps as $app) {
if ( strpos($app,"/boot/config/") === false ) { if ( strpos(realpath($app),"/boot/config/") === false ) {
$error = "Remove multiple apps: $app was not in /boot/config"; $error = "Remove multiple apps: $app was not in /boot/config";
break; break;
} }