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

部分地址解析resource错误 #41

Open
ssyuan opened this issue Jun 13, 2022 · 1 comment
Open

部分地址解析resource错误 #41

ssyuan opened this issue Jun 13, 2022 · 1 comment

Comments

@ssyuan
Copy link
Member

ssyuan commented Jun 13, 2022

com.novi.serde.DeserializationError: Some input bytes were not read
at org.starcoin.types.AccountAddress.bcsDeserialize(AccountAddress.java:30)
at org.starcoin.scan.service.TransactionService.getProposalEvents(TransactionService.java:338)
at org.starcoin.scan.service.TransactionService.getRangeByAddressAll(TransactionService.java:415)
at org.starcoin.scan.controller.TransactionV2Controller.getRangeByAddressAlias(TransactionV2Controller.java:74)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1063)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)

@zlgu
Copy link

zlgu commented Dec 4, 2022

关键日志:
image

复现bug:
image

建议:
starcoinscan-api完善参数格式校验
包括,net,address
如果不做基本格式校验,直接进行es查询,在恶意请求下会造成资源浪费。
同:starcoinorg/starcoin-search#54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants