Skip to content

Improve API client robustness by migrating to requests and adding URL validation #2

@RinZ27

Description

@RinZ27

The current EOfficeClient implementation relies on urllib.request.urlopen, which natively supports a wide range of protocols including file://, ftp://, and gopher://. Since the backend_url is a configurable parameter, this could potentially be exploited to perform Local File Inclusion (LFI) or Server-Side Request Forgery (SSRF) if a project's configuration is tampered with.

Migrating to the requests library would provide a more secure default by restricting supported protocols. Additionally, implementing a basic URL validation layer for the backend_url would ensure the client only connects to legitimate http/https endpoints. This improvement would significantly enhance the robustness of the eOffice integration, especially for enterprise deployments where cross-service communication security is paramount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions