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

高级参数设置中转base64不成功 #28

Closed
JSMengLingqi opened this issue Sep 20, 2019 · 1 comment
Closed

高级参数设置中转base64不成功 #28

JSMengLingqi opened this issue Sep 20, 2019 · 1 comment

Comments

@JSMengLingqi
Copy link

点击接口列表->运行->高级参数设置->
输入以下常量:
{"app_id" :"2019110000000123","subject" :"test","order_type" :"OTHERS","version" :"2.1.2","total_amount" :"3360","charge_account" :"15600000002","goods_list" : [ {"goods_detail" : {"productDetail" :"test","product" :"hgds","saleAmount" :"33.60","thumbnail" :"detail-dazs.png" },"number" : 1,"goods_id" :"1244606","goods_desc" :"one" } ],"open_id" :"bxidfsjeozs9qnlqe6yerh0yd82j0xw2","start_time" :"2019-09-19 02:32:55","path" :"newOrder","isThird" : 1,"mch_id" :"20191003"}
在方法中点击更多->选择base64
预览可以看到转换不成功

@BetaGo
Copy link
Collaborator

BetaGo commented Oct 17, 2019

@JSMengLingqi
原版yapi的常量输入,其实是作为一个表达式来处理的,假如输入 a | base64 会对 a 执行base64加密。 其中 {}|,:这些符号都有特殊含义,所以导致了转化失效。
现新加了一个安全常量的输入,会对输入值做一层转义,来实现参数转换,
image

@BetaGo BetaGo closed this as completed Oct 17, 2019
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