Schema Changes: 3.14.3
Upgrade: 3.14.2 → 3.14.3
This release applied 1 migration(s) to the database schema.
| ID | Type | Description |
|---|---|---|
schema |
typo in actor create salt |
Migration Details
1446 — typo in actor create salt
Type: schema
View SQL
CREATE OR REPLACE FUNCTION actor.create_salt(pw_type TEXT)
RETURNS TEXT AS $$
DECLARE
type_row actor.passwd_type%ROWTYPE;
/* Returns a new salt based on the passwd_type encryption settings.
* Returns NULL If the password type is not crypt()'ed.
*/
SELECT INTO type_row * FROM actor.passwd_type WHERE code = pw_type;
IF NOT FOUND THEN
RAISE EXCEPTION 'No such password type: %', pw_type;
END IF;
IF type_row.iter_count IS NULL THEN
-- This password type is unsalted. That's OK.
RETURN NULL;
END IF;
RETURN gen_salt(type_row.crypt_algo, type_row.iter_count);
END;
$$ LANGUAGE PLPGSQL;