mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
code hardening: empty file = invalid file (except user data)
This commit is contained in:
parent
88596cb855
commit
0ad7b93d58
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user