3 ms·
Looks like some rarely used view helpers. I doubt many of these are used in production apps. Hopefully no Bitcoin apps use the currency helper. But I imagine i
by dmix 13y ago
Looks like some rarely used view helpers. I doubt many of these are used in production apps.
Hopefully no Bitcoin apps use the currency helper. But I imagine in the context of an exchange the numbers come from the blockchain or a wallet, and aren't user controlled in the way that could be exploited.
- jonknee 13y agoWhy would they be rarely used? That's a very common task. A quick search on GitHub shows lots of likely uses: https://github.com/search?q=number_to_currency+in%3Afile+language%3Aruby&type=Code&ref=searchresults https://github.com/search?q=number_to_currency+in%3Afile+lan... https://github.com/search?q=number_to_human+in%3Afile+language%3Aruby&type=Code&ref=searchresults https://github.com/search?q=number_to_human+in%3Afile+langua... https://github.com/search?q=number_to_percentage+in%3Afile+language%3Aruby&type=Code&ref=searchresults https://github.com/search?q=number_to_percentage+in%3Afile+l...
- rst 13y agoNot at all rarely used. But it probably is somewhat rare to let users specify the strings which are supplied as, say, the ":units" argument to the formatting helper, which is where the vulnerability comes from. (If the user supplies a string which contains markup, and is passed as :units, :format, or :negative_format, it doesn't get escaped.)
- patio11 13y agonumber_to_currency is used in three of three Rails apps which I know well enough to grep without grepping, though not in the form which is vulnerable here. I have an imperfect understanding of the development practices in the wider community, but my guess is that, if your app touches money, it probably uses it.