[Filesystem] Add validation of decoded UTF-8 characters 70/129970/1
authorPawel Wasowski <p.wasowski2@partner.samsung.com>
Thu, 18 May 2017 09:50:31 +0000 (11:50 +0200)
committerPawel Wasowski <p.wasowski2@partner.samsung.com>
Thu, 18 May 2017 15:06:09 +0000 (17:06 +0200)
commit3c44b8fe425f22c41bea2c54ce04de60e29135e4
treeb183bc17d8b473ad428bf5344982b14af20dfa48
parent620523db5d48923ffb9a94661664a7534156610b
[Filesystem] Add validation of decoded UTF-8 characters

_utf8_decode function used to throw a RangeError exception, when an
invalid UTF-8 sequence was converted to a Unicode code point.

Byte sequences, invalid in terms of UTF-8, are now substituted with
an Unicode replacement character.

[Verification] TCT tct-filesystem-tizen-tests and tct-file-cordova-tests
               pass rate on a Z400 mobile device is 100%.
               Decoding was tested manually against numerous problematic
               byte sequences.

Change-Id: If8aefd3434a1b96ead11e36a1db1ddee4f2c3904
Signed-off-by: Pawel Wasowski <p.wasowski2@partner.samsung.com>
src/filesystem/js/base64.js