summaryrefslogtreecommitdiffstats
path: root/acf2/model/aaa.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acf2/model/aaa.lua')
-rw-r--r--acf2/model/aaa.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/acf2/model/aaa.lua b/acf2/model/aaa.lua
index c8a8328..7de4cfb 100644
--- a/acf2/model/aaa.lua
+++ b/acf2/model/aaa.lua
@@ -4,7 +4,6 @@ See LICENSE file for license details
--]]
local M = require('acf2.model')
-local object = require('acf2.object')
local digest = require('crypto').digest
@@ -20,11 +19,10 @@ end
local hash_pattern = '^(%w+)%$(%w+)%$%x+$'
-local Password = object.class(M.String)
+local Password = require('acf2.object').class(M.String)
-function Password:_validate(context, value)
- value = object.super(self, M.String):_validate(context, value)
- if not value or value:find(hash_pattern) then return value end
+function Password:normalize(context, value)
+ if value:find(hash_pattern) then return value end
local salt = ''
for i = 1,12 do