WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Jetpack redirects to admin home (11 posts)

  1. mazard
    Member
    Posted 11 months ago #

    We have followed this steps:

    Registered a developer app on wordpress.com (oauth2)
    Tested oauth2 auth flow with wordpress.com blog, it worked
    Installed latest wordpress on my own domain
    Installed Jetpack on my own domain
    Connected jetpack to wordpress.com, it worked
    Tried to authorize client to post on my own domain, it failed

    The flow starts with this url:
    https://public-api.wordpress.com/oauth2/authorize?client_id=5049&redirect_uri=http://www.qlinkbox.com/app/index.php?r=/service/WpSetService&response_type=code&currentId=-1

    When trying to authorize the client it asks which blog I want to connect, then I select the one on my own domain and I click to "Authorize".

    The url at this point is:
    http://blog.qlinkbox.com/wp-login.php?action=jetpack_json_api_authorization&redirect_to=https%3A%2F%2Fpublic-api.wordpress.com%2Foauth2%2Flogin%2F%3Fclient_id%3D5049%26redirect_uri%3Dhttp%253A%252F%252Fwww.qlinkbox.com%252Fapp%252Findex.php%253Fr%253D%252Fservice%252FWpSetService%26response_type%3Dcode%26currentId%3D-1%26action%3Doauth2-login%26blog_id%3D57105677%26blog%26_wpnonce%3D7afd3960af%26wp-submit%3DAuthorizing...%26redirect_to%3Dhttps%253A%252F%252Fpublic-api.wordpress.com%252Foauth2%252Fauthorize%252F%253Fclient_id%253D5049%2526redirect_uri%253Dhttp%25253A%25252F%25252Fwww.qlinkbox.com%25252Fapp%25252Findex.php%25253Fr%25253D%25252Fservice%25252FWpSetService%2526response_type%253Dcode%2526currentId%253D-1%2526jetpack-code%2526jetpack-user-id%253D0%2526action%253Doauth2-login&data=eyJjbGllbnRfaWQiOjUwNDksImNsaWVudF90aXRsZSI6IlFsaW5rQm94IiwiY2xpZW50X2ltYWdlIjoiIiwic3RhdGUiOiJiMjNlOWFkN2NiIn0%3D&token=bU%244Ub68IEiPmtSjvdtgLLXk9o%23UeQ%5EH%3A1%3A1&timestamp=1377886381&nonce=Itwjmm35jf&body-hash&signature=dv47%2BFY86lTwuK4iR1DgmvKsSEc%3D

    Then it asks the login in my domain, which I think is a bit strange because I already connected my blog to wordpress, when I login with admin account it just shows the admin panel main page.

    I also tried disabling all plugins but jetpack.

    Any help would be appreciated.

    Regards,
    mazard.

    http://wordpress.org/plugins/jetpack/

  2. Ben Lobaugh (blobaugh)
    Jetpack Engineer
    Plugin Author

    Posted 11 months ago #

    Mazard what client are you using to connect to your site?

  3. mazard
    Member
    Posted 11 months ago #

    It is our own client, it works fine with wordpress.com blogs.

  4. mazard
    Member
    Posted 11 months ago #

    But it really never reaches the client domain.

    It starts with the first url at http://public-api.wordpress.com where it is being redirected to http://blog.qlinkbox.com/wp-login.php.... (which I belive is the plugin endpoint).

  5. Ben Lobaugh (blobaugh)
    Jetpack Engineer
    Plugin Author

    Posted 11 months ago #

    I hope this is a silly question, but have you activated the JSON API module in Jetpack?

  6. mazard
    Member
    Posted 11 months ago #

    Yes, jetpack is connected to wordpress.com and the json api module is activated.
    I disabled and activated both the json api module and the connection to wordpress.com many times.

  7. mazard
    Member
    Posted 9 months ago #

    Any help would be appreciated... it looks more like a plugin's bug

  8. mazard
    Member
    Posted 9 months ago #

    Tried installing wordpress and jetpack from scratch in my localhost and it's working without problems.

    So it looks like a server requirement problem, any idea?
    Can it be some problem with ngnix? Is there any site with system requirements to check?

  9. Ben Lobaugh (blobaugh)
    Jetpack Engineer
    Plugin Author

    Posted 9 months ago #

    Hmm, it seems my last response to you did not post. Apologies about that.

    I am not positive on the server-side. As long as Jetpack has access to the servers and can be pinged back it should work. I am not experienced enough to know any gotchas with nginx configs.

  10. papoola
    Member
    Posted 2 months ago #

    we got exact same problem, I just posted this to support:

    1. jetpack installed on our blog
    2. modules json and single-sign-on are activated
    3. connected to our user account (prismahub) at wordpress.com
    4. when trying to get access key, authorize page shows up and our blog can be chosen in drop-down (screenshot1 - http://postimg.org/image/4ssm88inh/)
    5. after clicking "Authorize" we get login prompt for our blog (screenshot2 - http://postimg.org/image/4yhbbeb9p/)
    6. after logging in, we don't get redirected back but instead get dashboard page (screenshot3 - http://postimg.org/image/bx7hb5hi7/)

    Please note that steps above work perfectly with our blog hosted @ wordpress.com and as you see not with our blog hosted @ our server

  11. papoola
    Member
    Posted 1 month ago #

    Fortunately we found and fixed this issue.

    suhosin (security module for php) dropped one or many variables in url. ( private data have been substituted with ? )

    Jun  2 10:47:17 vps suhosin[5612]: ALERT - configured GET variable value length limit exceeded - dropped variable 'redirect_to' (attacker '??.??.??.??', file '/var/www/???/wp-login.php')
    Jun  2 10:47:23 vps suhosin[9646]: ALERT - configured GET variable value length limit exceeded - dropped variable 'redirect_to' (attacker '??.??.??.??', file '/var/www/???/wp-login.php')
    Jun  2 10:47:24 vps suhosin[8178]: ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '??.??.??.??', file '/var/www/???/wp-admin/admin.php', line 131)
    Jun  2 10:47:26 vps suhosin[5612]: ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '??.??.??.??', file '/var/www/???/wp-admin/admin.php', line 131)
    Jun  2 10:47:27 vps suhosin[9646]: ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '??.??.??.??', file '/var/www/???/wp-admin/admin.php', line 131)

    we solved this by editing /etc/php5/conf.d/suhosin.ini

    ;suhosin.get.max_value_length = 512

    to

    suhosin.get.max_value_length = 1024

    and restarting php /etc/init.d/php-fastcgi restart

Reply

You must log in to post.

About this Plugin

About this Topic