Skip to content

Duplicated mount configuration after going back during oauth2 flow #28479

Closed

Description

@jvillafanez

Steps to reproduce

  1. Go to the admin settings and configure a gdrive mount
  2. Setup the client id and secret, and click on "grant access"
  3. During the oauth2 flow in the browser, go back with the browser navigation

Expected behaviour

Admin settings page should show without the previous mount being configured. Showing a wrong state might be acceptable as long as access can be granted later.

Actual behaviour

Duplicated configuration of the previous mount is shown.

Server configuration

Operating system: ubuntu 16.04

Web server: apache 2.4.7

Database: mysql

PHP version: 7.0

ownCloud version: stable10 (10.0.2 at July, 25th)

Updated from an older ownCloud or fresh install: fresh install

Browser: firefox 50.1.0

Activity

  1. added this to the triage milestone on Jul 25, 2017
  2. jvillafanez commented on Jul 25, 2017

    @jvillafanez
    MemberAuthor

    This happened twice in a row after a fresh installation, both in admin and personal settings, but I couldn't reproduce it afterwards following the same steps.

  3. PVince81 commented on Jul 25, 2017

    @PVince81
    Contributor

    Yeah I remember seeing this before too, thanks for reporting

  4. added
    p3-medium
    and removed on Sep 14, 2017
  5. davitol commented on Sep 14, 2017

    @davitol
    Contributor

    screen shot 2017-09-14 at 13 43 22

    Also reproduced with oC 10.0.3.RC1 version. Something to be fixed in the future

  6. added
    p2-high
    and removed
    p3-medium
    on Sep 14, 2017
  7. PVince81 commented on Sep 14, 2017

    @PVince81
    Contributor

    setting to p2-high and "planned", this seems to happen more often than I thought

  8. modified the milestones: triage, on Sep 14, 2017
  9. PVince81 commented on Sep 18, 2017

    @PVince81
    Contributor

    @jvillafanez can you have a look ?

  10. jvillafanez commented on Sep 22, 2017

    @jvillafanez
    MemberAuthor

    Looks like the click-back messes might mess with the "natural" oauth1/2 flow and it's causing this issue. Still under investigation.

  11. jvillafanez commented on Oct 4, 2017

    @jvillafanez
    MemberAuthor

    Looks like the duplication might be "valid" in the sense that those mounts are saved in the DB.

    Reproduced by crazy-clicking the "grant access" button over a new mount point. Multiple queries are sent to the server to save that mount point which causes the duplication.

    No more crazy-clicking, see below

  12. jvillafanez commented on Oct 4, 2017

    @jvillafanez
    MemberAuthor

    Looks like this has been broken from the beginning since it's always sending duplicate requests just clicking once in the button. The fact that usually only one storage appears is likely because the rest of the duplicate requests don't trigger or reach the server before the browser changes the page.

    screen shot 2017-10-04 at 14 32 42

    I've constantly reproduced the error adding a debugger and breaking the js code (to prevent the browser to change the page) near the window.location around line 1455 of the settings.js file. There are always several requests to an oauth endpoint. The number of requests increases according to the mounts that are set.

  13. jvillafanez commented on Oct 4, 2017

    @jvillafanez
    MemberAuthor

    Ongoing fix in #29145

  14. jvillafanez commented on Oct 31, 2017

    @jvillafanez
    MemberAuthor

    Fix merged and expected in 10.0.4

  15. lock commented on Aug 1, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  16. locked as resolved and limited conversation to collaborators on Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

QA:knownType:Bugapp:files_externalp2-highsettings:adminstatus/STALE

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions