Skip to content

"set_decrypt_session" not working, got empty string. openresty bundle 1.15.8.1 #20

Description

@cqlangyi

good day,

when running demo encrypt/decrypt shown in project home, "set_decrypt_session" could not decrypt session, always got empty string.

location /encrypt {
    set $raw 'text to encrypted'; # from the ngx_rewrite module
    set_encrypt_session $session $raw;
    set_encode_base32 $session; # from the ngx_set_misc module

    add_header Set-Cookie 'my_login=$session';  # from the ngx_headers module

    # your content handler goes here...
}
location /decrypt {
    set_decode_base32 $session $cookie_my_login; # from the ngx_set_misc module
    set_decrypt_session **_$raw_** $session;

    if ($raw = '') {
        # bad session
    }

    # your content handler goes here...
}

the "$raw" is always empty string.

centos 7.4
openresty 1.15.8.1

thank you for the help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions