jku / repository-playground

Community artifact repository workflow experiments
Other
7 stars 4 forks source link

closure bug in secret handler #94

Open jku opened 1 year ago

jku commented 1 year ago

signers SignerRepository._sign() method has an inner method secret_handler that calls the actual handler set by the UI:

        def secret_handler(secret: str) -> str:
            return self._get_secret(secret, role)

This seems to have an issue where the value of role gets set when the inner function is first defined (when _sign() is first called)... meaning _get_secret() is always called with same value for role. This is not ideal

role is only used for output in the actual handler (_common.get_secret_input()): i'm removing the output for now but would like to re-add it once this is fixed