main: add --remote-saving for limiting clients remote session saving rights
This commit is contained in:
parent
c83414daf0
commit
7875344e0e
5 changed files with 12 additions and 2 deletions
|
|
@ -116,6 +116,10 @@ module.exports = {
|
|||
|
||||
sessionSetPath: function(data, clientId) {
|
||||
|
||||
if (settings.read('remoteSaving') && !RegExp(settings.read('remoteSaving')).test(ipc.clients[clientId].address)) {
|
||||
return
|
||||
}
|
||||
|
||||
ipc.clients[clientId].sessionPath = ''
|
||||
fs.lstat(data.path, (err, stats)=>{
|
||||
if (err || !stats.isFile()) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue