aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorgorhill <rhill@raymondhill.net>2014-09-03 20:34:00 -0400
committergorhill <rhill@raymondhill.net>2014-09-03 20:34:00 -0400
commit0ad7b93d5898aeb3902e42776b2783c557d92b36 (patch)
treeaf476c3dbcd00a0675347ca07ad0a09eba10cd44 /js
parent88596cb8552dc51d8d8be40a1f0b1a4837015715 (diff)
downloaduBlock-0ad7b93d5898aeb3902e42776b2783c557d92b36.zip
uBlock-0ad7b93d5898aeb3902e42776b2783c557d92b36.tar.gz
uBlock-0ad7b93d5898aeb3902e42776b2783c557d92b36.tar.bz2
code hardening: empty file = invalid file (except user data)
Diffstat (limited to 'js')
-rw-r--r--js/assets.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/assets.js b/js/assets.js
index 6f66c7e..bd2f86b 100644
--- a/js/assets.js
+++ b/js/assets.js
@@ -384,7 +384,8 @@ var readLocalFile = function(path, callback) {
var onCachedContentReady = function(details) {
//console.log('µBlock> readLocalFile("%s") / onCachedContentReady()', path);
- if ( !details.error && details.content !== '' ) {
+ // It's ok for user data to be empty
+ if ( !details.error && (details.content !== '' || reIsUserPath.test(path)) ) {
reportBack(details.content);
return;
}