Skip to content

WebServiceQuerier & post_max_size #3

Description

@MidgeS

Hi,
i just came across a small oversight which can cause quite some hassle.

Inside your WebServiceQuerier you have this check:

151:        $uploadMaxFileSize = ini_get("post_max_size");
152:        $uploadMaxFileSize = str_replace("M", "000000", $uploadMaxFileSize);
153:
154:        if($uploadMaxFileSize > strlen($this->parameters))

So the problem i had appeared when i set post_max_size to 0. Which as statet in the manual should be unlimited file size. This caused me some trouble since your code would never allow data to be send.
Further you are replacing M but not the also possible K and G.

This is how i altered the Code to prevent further problems

        $uploadMaxFileSize = ini_get("post_max_size");
        $uploadMaxFileSize = str_replace("M", "000000", $uploadMaxFileSize);
        $uploadMaxFileSize = str_replace("G", "000000000", $uploadMaxFileSize);
        $uploadMaxFileSize = str_replace("K", "000", $uploadMaxFileSize);

        if($uploadMaxFileSize > strlen($this->parameters) || $uploadMaxFileSize == 0)

0001-fixed-post_max_size.patch.zip

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