BUG: Fix infinite loops and data corruption in data layer#317
Open
pandashark wants to merge 1 commit intostefan-jansen:mainfrom
Open
BUG: Fix infinite loops and data corruption in data layer#317pandashark wants to merge 1 commit intostefan-jansen:mainfrom
pandashark wants to merge 1 commit intostefan-jansen:mainfrom
Conversation
Fix convert_cols exclude mask to use |= instead of &= so rows with uint32 overflow are actually filtered. Add bounds check in DataPortal._get_daily_spot_value to prevent infinite loop when no valid close price exists. Fix BcolzDailyBarReader.get_last_traded_dt to return pd.NaT when prev_day_ix reaches -1. Apply tz_localize to merger adjustment dates consistent with splits and dividends. Add path traversal validation to tar.extractall in Quandl bundle (CVE-2007-4559). Closes stefan-jansen#314
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.
Summary
Fixes 5 data layer bugs including 2 infinite loops, a data corruption issue, a timezone inconsistency, and a security vulnerability:
convert_colsused&=instead of|=for the exclude mask, meaning rows were never excluded unless every column overflowed simultaneously.DataPortal._get_daily_spot_valuelooped infinitely searching backwards for a non-NaN close price with no bounds check against_first_trading_day.BcolzDailyBarReader.get_last_traded_dtlooped infinitely whenprev_day_ixreached -1.tar.extractall()in the Quandl bundle had no path validation.Closes #314
Test plan