acs_mail_lite::valid_signature (private)

 acs_mail_lite::valid_signature -signature signature \
    -message_id message_id

Defined in packages/acs-mail-lite/tcl/acs-mail-lite-procs.tcl

Validates if provided signature syntactically matches message_id as generated by OpenACS and equals to the hash of the provided signature. GN: not sure, why both is checked.

Switches:
-signature
(required)
signature to be checked
-message_id
(required)
Returns:
boolean 0 or 1

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
        if {![regexp "(<\[\-0-9\]+\\.\[0-9\]+\\.oacs@[address_domain]>)" $message_id match id]
            || $signature ne [ns_sha1 $id]
        } {
            # either couldn't find message-id or signature doesn't match
            return 0
        }
        return 1
Generic XQL file:
packages/acs-mail-lite/tcl/acs-mail-lite-procs.xql

PostgreSQL XQL file:
packages/acs-mail-lite/tcl/acs-mail-lite-procs-postgresql.xql

Oracle XQL file:
packages/acs-mail-lite/tcl/acs-mail-lite-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: