Validate l10n ID is non-empty to prevent crash on empty string ID#146
Draft
imnasnainaec wants to merge 3 commits into
Draft
Validate l10n ID is non-empty to prevent crash on empty string ID#146imnasnainaec wants to merge 3 commits into
imnasnainaec wants to merge 3 commits into
Conversation
…pdater (#104) An empty string ID propagated silently through the system, producing a malformed .xlf file that crashed the application on next launch. Added ArgumentException at the GetDynamicString/GetDynamicStringOrEnglish entry points and a defensive early-return in XliffTransUnitUpdater.Update mirroring the existing LangId guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #104
Passing an empty string as the
idargument toGetString/GetDynamicStringproduced a malformed or zero-length.xlffile that crashed the application on the next launch.Added an
ArgumentExceptionguard at theGetDynamicStringandGetDynamicStringOrEnglishentry points inLocalizationManagerInternal, and a defensive early-return inXliffTransUnitUpdater.Updatemirroring the existingLangIdcheck.(Technically a breaking change.)
This change is
Devin review: https://app.devin.ai/review/sillsdev/l10nsharp/pull/146