pecl-php-uploadprogress | An extension to track progress of a file upload | File Upload library

 by   php C Version: uploadprogress-2.0.2 License: Non-SPDX

kandi X-RAY | pecl-php-uploadprogress Summary

kandi X-RAY | pecl-php-uploadprogress Summary

pecl-php-uploadprogress is a C library typically used in User Interface, File Upload applications. pecl-php-uploadprogress has no bugs, it has no vulnerabilities and it has low support. However pecl-php-uploadprogress has a Non-SPDX License. You can download it from GitHub.

A PHP extension to track progress of a file upload, including details on the speed of the upload, estimated time remaining, and access to the contents of the file as it is being uploaded.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pecl-php-uploadprogress has a low active ecosystem.
              It has 49 star(s) with 19 fork(s). There are 12 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 5 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pecl-php-uploadprogress is uploadprogress-2.0.2

            kandi-Quality Quality

              pecl-php-uploadprogress has no bugs reported.

            kandi-Security Security

              pecl-php-uploadprogress has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              pecl-php-uploadprogress has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              pecl-php-uploadprogress releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pecl-php-uploadprogress
            Get all kandi verified functions for this library.

            pecl-php-uploadprogress Key Features

            No Key Features are available at this moment for pecl-php-uploadprogress.

            pecl-php-uploadprogress Examples and Code Snippets

            No Code Snippets are available at this moment for pecl-php-uploadprogress.

            Community Discussions

            QUESTION

            Is strcpy generally unsafe or are there legitimate use-cases of that function?
            Asked 2020-May-12 at 17:47

            Background: I have a webapp that uses uploadprogress and it just caused a segmentation fault. Investigating about the problem I found a bug report that points the problem down to a line in the code https://bugs.php.net/bug.php?id=79584

            In this code I also saw, that they use strcpy. The function is used there for many years already so I guess it has been checked against security rules, but I am not a C programmer and my knowledge is very limited. I also found mentions that it sometimes can be legitimate to still use strcpy without causing any security issues.

            Now I wonder if that's the case in this special package. Is it safe that the code contains this function or not?

            ...

            ANSWER

            Answered 2020-May-12 at 17:47

            The bug produced by that commit has absolutely nothing to do with the safety of strcpy (or lack thereof).

            strcpy is not safe unless you have some way to ensure that the destination object is big enough to hold the source (including its NUL terminator). If you do that, then it is as safe as your checks are.

            Other than the confusion with dereference operators, the methodology of the linked code is adequate. Measuring strlen of the source string and adding one is a sufficient method to determine the length required; malloc of this amount is a sufficient method for allocating this much space. To that extent, strcpy(malloc(strlen(src) + 1), src) is as safe as you're going to find in C (aside from the cheekiness of not testing the return code of malloc for NULL; in real production code, you should do that, or use a malloc wrapper like emalloc in the PHP source).

            However, strdup(src) is much more concise and readable, and its conciseness makes typos less probable. Personally, I would recommend to always use strdup for such cases; if you are worried that your target platform doesn't contain an implementation, it's easy enough to shim.

            Source https://stackoverflow.com/questions/61754041

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install pecl-php-uploadprogress

            Install uploadprogress with pecl:.

            Support

            In forms for which you wish to track a file upload using uploadprogress, you must include a field named UPLOAD_IDENTIFIER. The value of the UPLOAD_IDENTIFIER field may be any string. We recommend a random, unique string per upload. This extension will use this value to keep track of the upload, and you may query the extension using this identifier to check the progress of the upload.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/php/pecl-php-uploadprogress.git

          • CLI

            gh repo clone php/pecl-php-uploadprogress

          • sshUrl

            git@github.com:php/pecl-php-uploadprogress.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link