Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hotfix for decorator @skey introduced by #1394 #1419

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

phorward
Copy link
Member

  • Method.skey must hold the entire skey_config, as it is used within Method.__call__
  • Method.additional_descr should be set to "skey"-name and not "access" (copy&paste bug)

Originated from error:

[2025-02-19 11:34:06,036] /.../viur/core/request.py:375 [ERROR] ViUR has caught an unhandled exception!
[2025-02-19 11:34:06,037] /.../viur/core/request.py:376 [ERROR] string indices must be integers, not 'str'
Traceback (most recent call last):
  File "~/viur-core/src/viur/core/request.py", line 350, in _process
    self._route(path)
  File "~/viur-core/src/viur/core/request.py", line 632, in _route
    res = caller(*self.args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/viur-core/src/viur/core/module.py", line 199, in __call__
    if self.skey and param_name == self.skey["forward_payload"]:
                                   ~~~~~~~~~^^^^^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'

@phorward phorward added bug(fix) Something isn't working or address a specific issue or vulnerability Priority: High After critical issues are fixed, these should be dealt with before any further issues. main labels Feb 19, 2025
@phorward phorward added this to the ViUR-core v3.7 milestone Feb 19, 2025
- `Method.skey` must hold the entire skey_config, as it is used within `Method.__call__`
- `Method.additional_descr` should be set to "skey"-name and not "access" (copy&paste bug)
@phorward phorward merged commit 240e385 into viur-framework:main Feb 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug(fix) Something isn't working or address a specific issue or vulnerability main Priority: High After critical issues are fixed, these should be dealt with before any further issues.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants