cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11643) Crash when file request is forbidden
Date Fri, 29 Jul 2016 14:19:20 GMT

    [ https://issues.apache.org/jira/browse/CB-11643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15399395#comment-15399395
] 

ASF GitHub Bot commented on CB-11643:
-------------------------------------

GitHub user cjpearson opened a pull request:

    https://github.com/apache/cordova-plugins/pull/26

    CB-11643: return after sending error

    ### Platforms affected
    
    iOS
    
    ### What does this PR do?
    
    After an error is returned, we should return and not process the request. Continuing to
process the request can cause a crash.
    
    ### What testing has been done on this change?
    
    Tested on a device with the sample app, adding the following code.
    
    ```
    document.getElementById("deviceready").addEventListener("click", function buttonClick()
{
                var fail = function () { console.log("failure"); }
                var photoSuccess = function (uri) {
                    var img = document.createElement("img");
                    debugger;
                    img.src = uri;
                    document.getElementById("deviceready").appendChild(img);
                };
                navigator.camera.getPicture(photoSuccess, fail, {
                            destinationType: navigator.camera.DestinationType.FILE_URI,
                            sourceType: navigator.camera.PictureSourceType.CAMERA,
                            saveToPhotoAlbum: false
                            });
                });
    ```
    
    ### Checklist
    - [X] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to
secretary@apache.org.
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [] Added automated test coverage as appropriate for this change.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cjpearson/cordova-plugins webserver-crash

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugins/pull/26.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #26
    
----
commit 2568693862556a712fdf760487a9d3f6f0ffb5f9
Author: Connor Pearson <cjp822@gmail.com>
Date:   2016-07-29T14:15:01Z

    CB-11643: return after sending error

----


> Crash when file request is forbidden
> ------------------------------------
>
>                 Key: CB-11643
>                 URL: https://issues.apache.org/jira/browse/CB-11643
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Labs, Plugin WKWebViewEngine
>            Reporter: Connor Pearson
>            Assignee: Shazron Abdullah
>
> When loading an image without the token cookie a 403 error is returned. The request is
still processed though and causes the web server to crash.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message