Description
The ExtensionDownloader class in src/extension_shield/core/extension_downloader.py defines two separate User-Agent strings with conflicting Chrome version numbers:
_get_chrome_headers() at line 29 returns Chrome/131.0.0.0
- Class variable
CHROME_USER_AGENT at line 58 uses Chrome/118.0.0.0
The _download() method at line 82 references the class constant, leaving _get_chrome_headers() as dead code that is never called anywhere in the codebase. Additionally, a CHROME_VERSION environment variable at line 48 introduces a third potential value, creating a three-way inconsistency.
Impact
- The outdated User-Agent (Chrome/118) may cause Google to return HTML error pages or 204 responses instead of valid CRX files
- Dead code adds maintenance burden
- Three-way inconsistency increases risk of future bugs when only one value is updated
Description
The
ExtensionDownloaderclass insrc/extension_shield/core/extension_downloader.pydefines two separate User-Agent strings with conflicting Chrome version numbers:_get_chrome_headers()at line 29 returnsChrome/131.0.0.0CHROME_USER_AGENTat line 58 usesChrome/118.0.0.0The
_download()method at line 82 references the class constant, leaving_get_chrome_headers()as dead code that is never called anywhere in the codebase. Additionally, aCHROME_VERSIONenvironment variable at line 48 introduces a third potential value, creating a three-way inconsistency.Impact