Avoid using locale-dependent boost trim functions in RPCAuthorized(…) and bitcoin-tx #18539

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:avoid-locale-dependent-trim changing 3 files +3 −7
  1. practicalswift commented at 3:50 pm on April 6, 2020: contributor
    Avoid using locale-dependent boost trim functions in RPCAuthorized(…) and bitcoin-tx.
  2. Avoid using locale-dependent boost trim functions in RPCAuthorized(...) and bitcoin-tx ee7562a1a2
  3. in src/bitcoin-tx.cpp:770 in ee7562a1a2
    766@@ -767,9 +767,7 @@ static std::string readStdin()
    767     if (ferror(stdin))
    768         throw std::runtime_error("error reading stdin");
    769 
    770-    boost::algorithm::trim_right(ret);
    771-
    772-    return ret;
    773+    return TrimString(ret);
    


    luke-jr commented at 3:52 pm on April 6, 2020:
    But this SHOULD be locale-tolerant!

    practicalswift commented at 3:53 pm on April 6, 2020:
    Why?

    luke-jr commented at 4:23 pm on April 6, 2020:
    It’s trimming actual user input.

    sipa commented at 5:36 pm on April 6, 2020:
    I think we only want the Qt GUI to be localized; not RPC and command-line tools.

    practicalswift commented at 6:31 pm on April 6, 2020:

    Agree fully with sipa.

    I’ve discussed localization extensively with various people in the project and IIRC I’ve never seen anyone except Luke make the claim that something other than Qt GUI should be localized.

    Luke, is that your perception as well that you’re representing a non-consensus opinion with regards to non-Qt GUI localization?

    To be clear: having a contrarian opinion is obviously perfectly fine – I love contrarians :)

  4. DrahtBot added the label RPC/REST/ZMQ on Apr 6, 2020
  5. DrahtBot added the label Tests on Apr 6, 2020
  6. MarcoFalke removed the label Tests on Apr 6, 2020
  7. DrahtBot commented at 1:00 am on April 7, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    No conflicts as of last run.

  8. practicalswift commented at 2:43 pm on April 29, 2020: contributor
    Any interest in avoiding locale dependent functions? If not I’ll close :)
  9. MarcoFalke commented at 3:02 pm on April 29, 2020: member
    Concept ACK
  10. practicalswift closed this on May 12, 2020

  11. practicalswift deleted the branch on Apr 10, 2021
  12. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me