New issue
Advanced search Search tips

Issue 61206 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Feature

Blocked on:
issue 168825

Blocking:
issue 53018
issue 152064
issue 160841



Sign in to add a comment

Add MD5 checksums to all the dictionaries

Project Member Reported by hbono@chromium.org, Oct 29 2010

Issue description

As written in  Issue 60816 , a corrupted spellchecker dictionary causes a renderer crash. We should check if a downloaded dictionary is sane in SpellCheckHost::OnURLFetchComplete().

To start a discussion, I would like to enumerate two trivial options:
* Add the checksums of all spellchecker dictionaries to the Chromium code and compare them.
* Chane the bdic format so we can integrate a checksum in each spellchecker dictionary and compare them.

Regards,
 

Comment 1 by est...@chromium.org, Oct 29 2010

The first option could cause compatibility issues between the user's chrome version and the dictionary version (but maybe we want that?)

Comment 2 by js...@chromium.org, Nov 1 2010

The dictionary version is also hard-coded in our code. So, the first option wouldn't have a problem, no?  

I see. Both options sound ok to me then. The second is perhaps preferable, but if it's too hard #1 is fine.

Comment 4 by hbono@chromium.org, Nov 2 2010

Greetings,

Thank you for your comments. I would like to implement my option #2 (i.e. adding a MD5 checksum to a bdic header) because it is pretty easy to do it. Even though we need to re-build all the spellchecker dictionaries to use the new format, I think it is a good chance to update them and add new words. :)

Regards,

Comment 5 by hbono@chromium.org, Nov 3 2010

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=65351

------------------------------------------------------------------------
r65351 | hbono@chromium.org | Sun Nov 07 22:48:23 PST 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell/google/bdict_writer.cc?r1=65351&r2=65350&pathrev=65351
 A http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell/google/bdict.cc?r1=65351&r2=65350&pathrev=65351
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell/google/bdict.h?r1=65351&r2=65350&pathrev=65351
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell/google/bdict_reader.cc?r1=65351&r2=65350&pathrev=65351
 M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell/hunspell.gyp?r1=65351&r2=65350&pathrev=65351

Add a MD5 checksum to the BDIC header.
This change adds a MD5 checksum to the BDIC header and fills the checksum when creating a BDIC. (Even though older Chrome can use new BDICs, I have updated the BDIC version to 2.0.) This change also adds hunspell::BDict::Verify() and moves the sanity check of a BDIC file there.

BUG= 61206 
TEST=http://codereview.chromium.org/4477002
Review URL: http://codereview.chromium.org/4409002
------------------------------------------------------------------------

Comment 7 by bugdro...@gmail.com, Nov 10 2010

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=65624

------------------------------------------------------------------------
r65624 | hbono@chromium.org | Tue Nov 09 19:52:58 PST 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=65624&r2=65623&pathrev=65624

Pulls the latest hunspell to merge r65351 "Add a MD5 checksum to the BDIC header".

TBR=estade,jshin
BUG= 61206 
TEST=<http://codereview.chromium.org/4477002>
Review URL: http://codereview.chromium.org/4664001
------------------------------------------------------------------------

Comment 8 by bugdro...@gmail.com, Nov 15 2010

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=66098

------------------------------------------------------------------------
r66098 | hbono@chromium.org | Sun Nov 14 22:12:03 PST 2010

Changed paths:
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/tools/convert_dict/convert_dict_unittest.cc?r1=66098&r2=66097&pathrev=66098
 M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/spellcheck_host.cc?r1=66098&r2=66097&pathrev=66098

Add sanity checks of the BDIC files to Chrome.
This change updates ConvertDictTest that trims the end of BDICTs and verify hunspell::BDict::Verify() treats the trimmed BDICTs as corrupted. (This is a Chromium-side change of r65351 <http://crrev.com/65351>.)

BUG= 61206 
TEST=unit_tests.exe --gtest_filter=ConvertDictTest.*
Review URL: http://codereview.chromium.org/4477002
------------------------------------------------------------------------

Comment 9 by laforge@google.com, Mar 7 2012

Status: Assigned
Available + Owner == Default to Assigned
Owner: odean@chromium.org
Greetings,

Even though I have added changes that verify MD5 checksums, I cannot update all dictionaries to new ones that include MD5 checksums. I'm passing this issue to Tyler to transfer all spellchecker issues to a new team.

Regards,

Hironori Bono

Comment 11 by odean@chromium.org, Aug 14 2012

Cc: rlp@chromium.org odean@chromium.org
Owner: rlp@chromium.org

Comment 12 by groby@chromium.org, Aug 31 2012

Cc: groby@chromium.org
Labels: -Pri-2 Pri-1 Mstone-26
Owner: groby@chromium.org
Summary: Add MD5 checksums to all the dictionaries (was: Need to check a downloaded dictionary is sane)
Cc: -rlp@chromium.org -groby@chromium.org -odean@chromium.org
Owner: rouslan@chromium.org
Am I correct in assuming that running "convert_dict en-US" will add the MD5 hash to the resulting bdic dictionary?
Status: Started
Blocking: chromium:160841
Blocking: chromium:152064
Project Member

Comment 19 by bugdroid1@chromium.org, Dec 27 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=174658

------------------------------------------------------------------------
r174658 | rlp@chromium.org | 2012-12-27T05:00:35.307077Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/hu-HU-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/id-ID-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/sl-SI-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/en-US-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/ca-ES-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/en-GB-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/lt-LT-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/sv-SE-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/ro-RO-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/af-ZA-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/he-IL-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/lv-LV-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/pt-PT-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/en-AU-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/fo-FO-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/ta-IN-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/ko-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/nb-NO-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/ru-RU-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/fr-FR-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/de-DE-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/hr-HR-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/da-DK-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/nl-NL-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/README.chromium?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/uk-UA-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/en-CA-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/pl-PL-3-0.bdic?r1=174658&r2=174657&pathrev=174658
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/pt-BR-3-0.bdic?r1=174658&r2=174657&pathrev=174658

[Spellcheck] Updating hunspell dictionaries to newest version.\nBUG=61206
Patch from Rouslan Solomakhin <rouslan@chromium.org>.
------------------------------------------------------------------------
Blockedon: chromium:168825
Status: Fixed
All dictionaries will have checksums in version > 26.0.1379.1.
Project Member

Comment 23 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-UI -Feature-Spellcheck -Mstone-26 Cr-UI M-26 Cr-UI-Browser-Spellcheck
Components: -UI>Browser>Spellcheck UI>Browser>Language>Spellcheck

Sign in to add a comment