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

%、_、[、]等符号查询报错。 #185

Closed
xShower opened this issue Nov 7, 2019 · 3 comments
Closed

%、_、[、]等符号查询报错。 #185

xShower opened this issue Nov 7, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@xShower
Copy link

xShower commented Nov 7, 2019

试了几个模块的查询都有类似问题。
%和_符号过滤不了数据。这应该是mysql的问题。
QQ截图20191107140747
QQ截图20191107140759

中括号直接查询异常了
QQ截图20191107140814

@elunez
Copy link
Owner

elunez commented Nov 7, 2019

url 中可能不允许出现这种符号,你 f12 看,很明显没有进去到系统

@elunez elunez closed this as completed Nov 7, 2019
@xShower
Copy link
Author

xShower commented Nov 7, 2019

中括号是代码程序的问题。但是有解决方法。可以参考springboot的解决方案。
关于SpringBoot 请求参数包含 [] 特殊符号 返回400状态

百分号和下划线打开 F12是有进到后台的吧。我查了下是sql语句的问题。如果是mysql的话,查询语句需要用escape关键字。
image

@elunez elunez added enhancement New feature or request bug Something isn't working labels Nov 7, 2019
@elunez elunez reopened this Nov 7, 2019
@elunez elunez removed the bug Something isn't working label Nov 7, 2019
@elunez
Copy link
Owner

elunez commented Nov 7, 2019

中括号是代码程序的问题。但是有解决方法。可以参考springboot的解决方案。
关于SpringBoot 请求参数包含 [] 特殊符号 返回400状态

百分号和下划线打开 F12是有进到后台的吧。我查了下是sql语句的问题。如果是mysql的话,查询语句需要用escape关键字。
image
_ % 作为mysql通配符,一般名称都不会有这个,如果存在的话,就自行解决吧

@elunez elunez closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants