shared: SandboxedProcessor: Return NO_ACCESS when file not readable

このコミットが含まれているのは:
Albert S. 2022-06-23 15:24:49 +02:00
コミット 0867ab294d
2個のファイルの変更5行の追加0行の削除

ファイルの表示

@ -11,6 +11,7 @@ enum DataSource
}; };
#define NOTHING_PROCESSED 4 #define NOTHING_PROCESSED 4
#define NO_ACCESS 5
class Processor class Processor
{ {

ファイルの表示

@ -92,6 +92,10 @@ int SandboxedProcessor::process()
processor = defaultTextProcessor; processor = defaultTextProcessor;
} }
} }
if(!fileInfo.isReadable())
{
return NO_ACCESS;
}
if(processor == nullptr || processor == nothingProcessor) if(processor == nullptr || processor == nothingProcessor)
{ {
/* Nothing to do */ /* Nothing to do */