diff options
author | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 16:07:14 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2012-09-26 16:07:14 +0200 |
commit | b9d1c6d461d2c208dbcbcbb3458c02e99bac348a (patch) | |
tree | 9728506ef64ddc0ffa16ab43750d6f9b5e1bfd81 | |
parent | Add backup size checking (diff) | |
download | android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar.gz android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar.bz2 android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar.lz android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar.xz android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.tar.zst android_bootable_recovery-b9d1c6d461d2c208dbcbcbb3458c02e99bac348a.zip |
-rw-r--r-- | extra-functions.c | 4 | ||||
-rwxr-xr-x | gui/devices/1024x600/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/1024x768/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/1280x800/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/1920x1200/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/320x480/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/480x800/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/480x854/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/540x960/res/ui.xml | 4 | ||||
-rw-r--r-- | gui/devices/720x1280/res/ui.xml | 4 | ||||
-rwxr-xr-x | gui/devices/800x1280/res/ui.xml | 4 | ||||
-rwxr-xr-x | gui/devices/800x480/res/ui.xml | 4 |
12 files changed, 24 insertions, 24 deletions
diff --git a/extra-functions.c b/extra-functions.c index b00f2deae..763098da3 100644 --- a/extra-functions.c +++ b/extra-functions.c @@ -23,7 +23,6 @@ #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> - #include <linux/input.h> #include "bootloader.h" @@ -93,11 +92,12 @@ int check_backup_name(int show_error) { return 0; // A "0" (zero) means to use the current timestamp for the backup name for (index=0; index<copy_size; index++) { cur_char = (int)backup_name[index]; - if ((cur_char >= 48 && cur_char <= 57) || (cur_char >= 65 && cur_char <= 91) || cur_char == 93 || cur_char == 95 || (cur_char >= 97 && cur_char <= 123) || cur_char == 125 || cur_char == 45 || cur_char == 46) { + if (cur_char == 32 || (cur_char >= 48 && cur_char <= 57) || (cur_char >= 65 && cur_char <= 91) || cur_char == 93 || cur_char == 95 || (cur_char >= 97 && cur_char <= 123) || cur_char == 125 || cur_char == 45 || cur_char == 46) { // These are valid characters // Numbers // Upper case letters // Lower case letters + // Space // and -_.{}[] } else { if (show_error) diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index bb1b0daa2..4cfac6d21 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -1859,7 +1859,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -2200,7 +2200,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index 2f1eec1c8..35e6ab376 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -1859,7 +1859,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -2200,7 +2200,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index cfe933598..f2808c28f 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -1859,7 +1859,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -2200,7 +2200,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index 2da3f7d07..13b0eb278 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -1859,7 +1859,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -2200,7 +2200,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index e43ec6912..b5ff423c8 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -1438,7 +1438,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1777,7 +1777,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index de7304a36..c63b44b6a 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -1437,7 +1437,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1776,7 +1776,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index c13ce5c51..ff2eea953 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -1436,7 +1436,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1775,7 +1775,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index 432681110..1e3814d81 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -1437,7 +1437,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1776,7 +1776,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index 13a52ba6c..9d0732609 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -1442,7 +1442,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1781,7 +1781,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index 552a12c0e..f9ea3115d 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -1438,7 +1438,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -1777,7 +1777,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index 798b08db4..0400f55e9 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -1859,7 +1859,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_name%</text> <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> <action function="set">tw_existpage=backupname2</action> @@ -2200,7 +2200,7 @@ <font resource="font" color="%text_color%" /> <text>%tw_backup_rename%</text> <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> + <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> <actions> <action function="set">tw_back=restore</action> <action function="set">tw_action=cmd</action> |