tyk
tyk copied to clipboard
Fix invalid memory address or nil pointer dereference in Golang Virtual Endpoints
[Jul 20 14:23:42] DEBUG Started api_id=1 api_name=Tyk Test API mw=GoPluginMiddleware: : org_id=default origin=172.17.0.1 path=/tyk-api-test/foo ts=1658327022041894229
[Jul 20 14:23:42] DEBUG Go-plugin request processing took ms=0.010736 mwPath=123321/plugin.so mwSymbolName=GoPluginFoo
[Jul 20 14:23:42] ERROR Recovered from panic while running Go-plugin middleware func error=runtime error: invalid memory address or nil pointer dereference mwPath=123321/plugin.so mwSymbolName=GoPluginFoo
[Jul 20 14:23:42] DEBUG Finished api_id=1 api_name=Tyk Test API code=500 error=runtime error: invalid memory address or nil pointer dereference mw=GoPluginMiddleware: : ns=95692 org_id=default origin=172.17.0.1 path=/tyk-api-test/foo
Signed-off-by: Chenyang Yan [email protected]
Description
Fix invalid memory address or nil pointer dereference in Golang Virtual Endpoints
Related Issue
#4197
How This Has Been Tested
See log message and do not produce panic error
I'd suggest introducing a new local variable successHandler
as already done with logger
and handler
. Else you modify the shared GoPluginMiddleware
on every call there.
I'd suggest introducing a new local variable successHandler as already done with logger and handler
Good idea, I will update it
@uddmorningsun thanks for the contribution. We're logging this PR internally and planning it for the next patch releases!
I found Update branch/Update with rebase
will contains other commit to review for github (force-pushed the master branch from 2f049e6 to 7e0e11c
), it's not my expected rebase result...😅https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/
Sorry to bother your review, I have rebased manual with command line
Waiting for this fix