Skip to content

"function htFileExists" stalls on a malformed URL (Windows) #352

@JoeJoeSoft

Description

@JoeJoeSoft

When a malformed URL is received as a link, using the form of "//site.com/path" with no leading "protocol:", the function htFileExists() will stall for about 30 seconds.

When this URL fails to load normally in THtmlViewer.LoadFromUrl(), the code tries to treat this as a file and converts to the form of "\site.com\path". Calling "ExpandFileName()" converts the slashes. The URL is treated as if it started with "file:" as the protocol.

When FileExists() is called in htFileExists(), the path is treated as a UNC path. Windows tries to locate a machine named "site.com" on the local network and hangs until it times out. This causes the program to freeze for about 30 seconds by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions