-
Notifications
You must be signed in to change notification settings - Fork 21
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 make on master #51
Conversation
Yes, Thanks! |
OK. Thanks @dinosaure. I was having a look at ocaml-base64 because it is used by ocaml-rpc to decode return values from XMLRPC servers. It turns out that the Python xmlrpc library encodes with line breaks (and I need to communicate with a Python server), so I was going to propose a patch to ocaml-base64 to accept line breaks. Then I understood that there is already a Base64_rfc2045 module, so it may be better just to update ocaml-rpc to use it's decode function. |
Hmmhmm, be care about that (/cc @hannesm). From a security perspective, we should not accept some else than the given alphabet - and if we get a "bad" character, we should just fail instead of silently accepts some non-conform characters. May be the best should to add a |
I understand. Thanks for the remark. Looking at the RFCs and discussions here, I got the impression that there were security issues. The doc for the Python library says that it linebreaks every 76 characters and is based on the rfc2045 interpretation of base64. Unfortunately, the server I want to communicate with seems to be written in Python! |
well, similar to So, eventually there are two dimensions here: after how many characters and which character to insert. Maybe two optional arguments would be good to have. |
Thanks, in few days, I will try to propose something about |
Thanks @dinosaure. For what it's worth, here was the function that I hacked together to make my client work (with a suggestion from @mseri for the comments):
One idea for the ocaml-rpc library is simply to allow callers to specify their own base64 decode function, while defaulting to |
CHANGES: - Few fixes about benchmarks and tests (mirage/ocaml-base64#51, @tbrk, @dinosaure) - Add missing dependency about `fmt` and fix the compilation for OCaml 5.0 (mirage/ocaml-base64#52, @kit-ty-kate)
CHANGES: - Few fixes about benchmarks and tests (mirage/ocaml-base64#51, @tbrk, @dinosaure) - Add missing dependency about `fmt` and fix the compilation for OCaml 5.0 (mirage/ocaml-base64#52, @kit-ty-kate)
make
on master fails under OCaml 4.12.1. Is this normal? Maybe I've misunderstood something. Anyway this patch fixes it.