-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
MMKV.mmkvWithID crash #60
Comments
Well, MMKV uses id as filename. For the time being, just don't do this. |
Why not Hash Code or MD5 |
It's already shipped. Now is too late for that. That's why. |
Is it possible to encode only special characters? |
Or just throw exception on bad id? Encoding special char is always complicated. Say you replaces |
Is this related to |
No. It has nothing to do with Android. All those |
Fixed with commit. |
No backward compatible? I think it compatible, previously it would crash, after encode specific char, it works. |
Had I not been clear? Those encodeXXX algorithms, no matter which char(s) they choose to escape, are choosing valid chars to escape with. And how do they handle these valid chars themself? They do double escape. That's where the No backward compatible happens. |
@lingol First, scan the |
Say we replace Given Now tell me, how do you handle this collision? |
@lingol Emm, maybe you don't get what I point 😂 . I'll explain further, as your example, if given |
what? are you sure
Sent from Meizu M5 Note
…-------- Original message --------
Sender: ysbing <notifications@github.com>
Time: Fri 10/12 16:27
To: Tencent/MMKV <MMKV@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [Tencent/MMKV] MMKV.mmkvWithID crash (#60)
Other char?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/Tencent/MMKV","title":"Tencent/MMKV","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in ***@***.*** in #60: Other char?\r\n![qwe](https://user-images.githubusercontent.com/12974456/46857498-addaf380-ce3b-11e8-85bf-d443c3326c87.png)\r\n"}],"action":{"name":"View Issue","url":"#60 (comment)"}}} [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#60 (comment)", "url": "#60 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } }, { ***@***.***": "MessageCard", ***@***.***": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [Tencent/MMKV] MMKV.mmkvWithID crash (#60)", "sections": [ { "text": "", "activityTitle": "**ysbing**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": ***@***.***", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", ***@***.***": "ActionCard", "inputs": [ { "isMultiLine": true, ***@***.***": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"Tencent/MMKV\",\n\"issueId\": 60,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "targets": [ { "os": "default", "uri": "#60 (comment)" } ], ***@***.***": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 386096563\n}" } ], "themeColor": "26292E" } ]
|
@zhongwuzw That might just work. Would you like to write a pr? |
@lingol Yeah, I can, but firstly, I need to confirm something because I'm not familiar |
@zhongwuzw Not just |
Release with v1.0.13. |
id中使用
/
会导致崩溃The text was updated successfully, but these errors were encountered: