summaryrefslogtreecommitdiffstats
path: root/fetchmail-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-10-07 17:31:24 +0000
committerTed Trask <ttrask01@yahoo.com>2008-10-07 17:31:24 +0000
commit297d691ef4a429d798eda666bc6662243a4d7230 (patch)
treea531ca8731930ecfcd0f5083e98901d7435d9fe4 /fetchmail-model.lua
parent938c81199933cc10fc231d6c017d65b4507ea5cc (diff)
downloadacf-fetchmail-297d691ef4a429d798eda666bc6662243a4d7230.tar.bz2
acf-fetchmail-297d691ef4a429d798eda666bc6662243a4d7230.tar.xz
Modified modelfunctions library to include validation in get/setfiledetails. Modified all uses to validate the file name - this was a major security hole.
git-svn-id: svn://svn.alpinelinux.org/acf/fetchmail/trunk@1542 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'fetchmail-model.lua')
-rw-r--r--fetchmail-model.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/fetchmail-model.lua b/fetchmail-model.lua
index d3dd51c..456a12e 100644
--- a/fetchmail-model.lua
+++ b/fetchmail-model.lua
@@ -316,9 +316,8 @@ function get_filedetails()
end
function update_filecontent(filedetails)
- filedetails.value.filename.value = configfile
-- FIXME - validation
- local retval = modelfunctions.setfiledetails(filedetails)
+ local retval = modelfunctions.setfiledetails(filedetails, {configfile})
posix.chmod(configfile, "rwx--x---")
config = nil
return retval