-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix qimei error -1 on Android #2753
Conversation
|
这函数本身就不应该换行,windows平台就是没换行的,如果单纯去掉换行就出了问题...那windows平台应该早就出问题了 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
就是你应该也去测一下调用这个函数的其他地方(使用的地方很少其实),比如匿名群消息什么的,我觉得这个很可能本来也有问题 |
抱歉忘了点 submit review ;v; |
这样是否会导致不一致?因为windows平台的base64是没有换行的 |
你测试一下( |
|
运行结果:
没有出现换行,既然jvm原生都没有出现换行,安卓就没必要换行,所以NO_WRAP是可以的 |
除非要换行都换行,绝对不能出现平台不同,编码结果不一样的情况 |
那这样就没问题 |
@StageGuard 我测过了,jvm下不会换行,测试代码在上面,不放心可以自己运行,jvm都不换行,android就没必要换行了吧,要保证行为一致呀 |
Base64居然敢自动换行!!直接导致qimei post 失败 error code -1 不解释!
#2752
会导致直接post以下内容(多出了可恶的\n):
本补丁将不允许base64编码时夹带换行符,也不允许带换行符的base64被解码(解码前需要提前替换\n),与瘟斗士平台保持一致