wendux / DSBridge-IOS

:earth_asia: A modern cross-platform JavaScript bridge, through which you can invoke each other's functions synchronously or asynchronously between JavaScript and native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

方法名的匹配逻辑有问题。

AlexLearnsToCode opened this issue · comments

例如在同一个jsBridge中实现了 request和requestWithData,如果前端调用了request,但是requestWithData的定义比requst早,则实际调用的方法是requestWithData,因为源码中方法匹配的逻辑是根据方法前缀以及参数个数来匹配的,有漏洞。建议根据方法的signature来匹配。
方法匹配逻辑在JSBUtil.m文件 方法methodByNameArg:selName:class: 中。

commented

已修复,请升级到>=3.0.3