From 50844c9aa17d26a8da03abbef8f9ad6ebf6fdaa7 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 14 Aug 2009 10:32:30 +0000 Subject: Fixed bug to allow arbitrary characters in system password, bumped to 0.5.3 --- Makefile | 2 +- password-model.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 61fb3d7..ec78402 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ APP_NAME=alpine-baselayout PACKAGE=acf-$(APP_NAME) -VERSION=0.5.2 +VERSION=0.5.3 APP_DIST=\ alpine-baselayout.roles \ diff --git a/password-model.lua b/password-model.lua index accab05..f66c74b 100644 --- a/password-model.lua +++ b/password-model.lua @@ -26,7 +26,7 @@ update_password = function (pw) end if success then - local f = io.popen("/usr/bin/cryptpw " .. format.escapespecialcharacters(pw.value.password.value)) + local f = io.popen("/usr/bin/cryptpw '" .. string.gsub(pw.value.password.value, "'", "'\\''") .. "'") local newpass = f:read("*l") f:close() local new = string.gsub(filecontent, "(\n"..pw.value.user.value..":)[^:]*", "%1"..newpass) -- cgit v1.2.3