Mercurial Hosting > luan
comparison src/luan/modules/lucene/Lucene.luan @ 1133:ba4daf107e07
fix security bug
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 17 Jan 2018 20:59:42 -0700 |
parents | 3234a14bb1f8 |
children | e54ae41e9501 |
comparison
equal
deleted
inserted
replaced
1132:b70102bab110 | 1133:ba4daf107e07 |
---|---|
144 | 144 |
145 local function multi_error() | 145 local function multi_error() |
146 error "multiple lucene instances" | 146 error "multiple lucene instances" |
147 end | 147 end |
148 | 148 |
149 if Rpc.functions.backup == nil then | 149 if Rpc.functions.lucene_backup == nil then |
150 | 150 |
151 function Rpc.functions.lucene_backup(password) | 151 function Rpc.functions.lucene_backup(password) |
152 Io.password == password or error "wrong password" | 152 Io.password == password or error "wrong password" |
153 local zip_file = uri("file:"..index.dir).parent().child("backup.zip") | 153 local zip_file = uri("file:"..index.dir).parent().child("backup.zip") |
154 index.zip(zip_file) | 154 index.zip(zip_file) |