Drop the dead PnP-name scrapers - #538
Merged
Merged
Conversation
Html.cs carried three scrapers that looked a monitor's PnP code up on driverlookup.com, driveragent.com and driversdownloader.com, plus the HttpWebRequest plumbing behind them — spoofed user agent, cookie container, commented-out __VIEWSTATE handling. An old attempt at enriching monitor names that has not worked in years. Nothing called any of it. The single live caller (WindowsLayoutFactory.SetPnpDeviceName) uses CleanupPnpName, a local string tidy-up that never touches the network, so this deletes the scrapers and keeps the cleanup. Worth removing rather than leaving inert: a grep of the tree for outbound URLs turned these up while writing the privacy policy, and code aimed at scraping third-party sites reads badly in an application that otherwise only contacts GitHub and televisions on the local network — whatever the call graph says. The remaining function is renamed with its file, HtmlHelper.CleanupPnpName -> PnpName.Cleanup: nothing here parses HTML any more.
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.
Found while writing the privacy policy for #536.
Html.cscarried three scrapers that looked a monitor's PnP code up ondriverlookup.com,driveragent.comanddriversdownloader.com, plus theHttpWebRequestplumbing behind them — a user agent spoofed as MSIE 5.01, a cookie container, commented-out__VIEWSTATEhandling. An old attempt at enriching monitor names that has not worked in years.Nothing called any of it. The single live caller,
WindowsLayoutFactory.SetPnpDeviceName, usesCleanupPnpName— a local string tidy-up that never touches the network. This deletes the scrapers and keeps the cleanup.Why remove it rather than leave it inert
A grep of the tree for outbound URLs turned these up while I was establishing what
PRIVACY.mdcould truthfully claim. Answering "the app contacts GitHub and televisions on your local network" required a call-graph argument to explain away three hardcoded scraping URLs.With this gone, that claim is verifiable by grep — which is what a SignPath Foundation reviewer will actually do. Code aimed at scraping third-party sites also reads badly in a signing application, whatever the call graph says.
The rename
HtmlHelper.CleanupPnpName→PnpName.Cleanup, with the file renamed to match. Nothing here parses HTML any more; keeping the old name would just move the misunderstanding somewhere else. One call site updated.The remaining function is unchanged, byte for byte — this PR removes code and renames, it does not alter behaviour.
Verification
LittleBigMouse.DisplayLayoutandLittleBigMouse.Platform.Windowsboth build with 0 errors (warnings are pre-existing).grep -riE "driverlookup|driveragent|driversdownloader|HtmlHelper"over the tree now returns only the comment inPnpName.csthat records why they are gone.🤖 Generated with Claude Code