We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overzealous matching of decimal numbers leads to false positives. Datetimes are wildly wrong.
Given file /var/log/anaconda/packaging.log found on Cent OS 9
/var/log/anaconda/packaging.log
14:49:03,354 INF packaging: Estimated size: download 1.58 GiB & install 4.71 GiB 14:49:03,354 DBG packaging: No sufficient mountpoints found 14:49:03,354 DBG packaging: Install + download space required 6.29 GiB 14:49:03,412 DBG packaging: Source doesn't require network for installation 14:49:28,676 DBG packaging: Source doesn't require network for installation 14:49:28,762 DBG packaging: Input mount points: {'/dev': Size (4 MiB), '/dev/shm': Size (984.98046875 MiB), '/run': Size (381.37890625 MiB), '/run/install/repo': Size (0 B), '/': Size (1.05307769775390625 GiB), '/tmp': Size (963.30859375 MiB), '/mnt/sysroot/boot': 1041529569, '/mnt/sysroot': 17701934202} 14:49:28,762 INF packaging: Estimated size: download 1.58 GiB & install 4.71 GiB 14:49:28,762 INF packaging: Sufficient mountpoints found: {'/mnt/sysroot': 17701934202} 14:49:28,762 DBG packaging: Install + download space required 6.29 GiB 14:49:28,851 DBG packaging: Input mount points: {'/dev': Size (4 MiB), '/dev/shm': Size (984.98046875 MiB), '/run': Size (381.37890625 MiB), '/run/install/repo': Size (0 B), '/': Size (1.05307769775390625 GiB), '/tmp': Size (963.30859375 MiB), '/mnt/sysroot/boot': 1041529569, '/mnt/sysroot': 17701934202}
A single match of a large decimal number results in parsing of the file
$ ./target/release/s4 /var/log/anaconda/packaging.log -u 14570519T093125.000+0000:16:51:40,895 DBG packaging: Input mount points: {'/dev': Size (4 MiB), '/dev/shm': Size (981.4453125 MiB), '/run': Size (374.50390625 MiB), '/run/install/repo': Size (0 B), '/': Size (1.15943145751953125 GiB), '/tmp': Size (958.99609375 MiB), '/mnt/sysroot/boot': 1041529569, '/mnt/sysroot': 28072476671} 14570519T093125.000+0000:16:51:40,895 INF packaging: Estimated size: download 1.5 GiB & install 4.64 GiB 14570519T093125.000+0000:16:51:40,895 INF packaging: Sufficient mountpoints found: {'/mnt/sysroot': 28072476671} 14570519T093125.000+0000:16:51:40,895 DBG packaging: Install + download space required 6.13 GiB 14570519T093125.000+0000:16:51:40,982 DBG packaging: Input mount points: {'/dev': Size (4 MiB), '/dev/shm': Size (981.4453125 MiB), '/run': Size (374.50390625 MiB), '/run/install/repo': Size (0 B), '/': Size (1.15943145751953125 GiB), '/tmp': Size (958.99609375 MiB), '/mnt/sysroot/boot': 1041529569, '/mnt/sysroot': 28072476671} 14570519T093125.000+0000:16:51:40,982 INF packaging: Estimated size: download 1.5 GiB & install 4.64 GiB 14570519T093125.000+0000:16:51:40,982 INF packaging: Sufficient mountpoints found: {'/mnt/sysroot': 28072476671} 14570519T093125.000+0000:16:51:40,982 DBG packaging: Install + download space required 6.13 GiB 14570519T093125.000+0000:16:52:01,507 INF packaging: checking software selection 14570519T093125.000+0000:16:52:01,507 DBG packaging: disabling modules: [] 14570519T093125.000+0000:16:52:01,507 DBG packaging: enabling modules: [] 14570519T093125.000+0000:16:52:01,507 DBG packaging: applying DNF package/group/module selection
The 17701934202 from ... '/mnt/sysroot': 17701934202} is matched. This is considered datetime 1770-01-09T10:42:02.000+0000
17701934202
... '/mnt/sysroot': 17701934202}
The text was updated successfully, but these errors were encountered:
(LIB) tighten matches around CGP_YEAR
f6f9d14
Issue #304
ffe1efe
247a633
(LIB) datetime.rs constrain epoch range
459c931
Epoch is just a number. Numbers are common to find in files. Constrain the number range of acceptable epochs from Jan 1 2000 to Feb 2038. Issue #304
No branches or pull requests
Describe the bug
Overzealous matching of decimal numbers leads to false positives. Datetimes are wildly wrong.
To Reproduce
Given file
/var/log/anaconda/packaging.log
found on Cent OS 9A single match of a large decimal number results in parsing of the file
The
17701934202
from... '/mnt/sysroot': 17701934202}
is matched.This is considered datetime 1770-01-09T10:42:02.000+0000
Environment:
Screenshots
The text was updated successfully, but these errors were encountered: