Summary: | Imgur autorization not work : Integrate Oauth2 library [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | roman <ceo.roman> |
Component: | Plugin-WebService-Imgur | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aspotashev, caulier.gilles, fabian, metzpinguin, varlesh, willysr, zatherz |
Priority: | NOR | ||
Version: | 5.0.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kipi-plugins/c0336e003d91577a84d587d69ee77ff1fb7c78e0 | Version Fixed In: | 5.1.0 |
Sentry Crash Report: | |||
Attachments: |
Patch to add a oauth2 library to libkipiplugins
Add o2 library from https://github.com/pipacs/o2 Fix o2 to be compatible with imgur Rewrite imgur plugin to work with OAuth2 |
Description
roman
2016-03-11 11:00:26 UTC
This must be fixed in last 4.14.0... Gilles Caulier I'm use KDE5 and ??? You can install a more recent version of kipi-plugins... Gilles Caulier *** This bug has been marked as a duplicate of bug 358704 *** You want say what git version of kipi-plugin is old? You set version 4.4.0. try with last stable 4.14.0 instead. current git is 5.0.0, not yet finalized... Gilles Caulier I think it's OK to report bugs against beta versions and/or Git master, otherwise we will probably release 5.0.0 with horrible bugs. *** Bug 358704 has been marked as a duplicate of this bug. *** I have the newest git version and this issue still exists. I confirm this. Screen not upload to ImgUr Spectacle show "Error page returned" archlinux x86_64 spectacle 16.04.1 Git commit 6e02be27e833442028ac2be4f4737d6a9e2493e4 by Maik Qualmann. Committed on 07/06/2016 at 19:08. Pushed by mqualmann into branch 'master'. drop KIO from Imgur export tool and porting to current API FIXED-IN: 5.0.0 M +3 -1 NEWS M +2 -1 imgur/CMakeLists.txt M +8 -8 imgur/imgurimageslist.cpp M +67 -88 imgur/imgurtalker.cpp M +2 -10 imgur/imgurtalker.h M +19 -27 imgur/imgurtalker_common.h M +2 -2 imgur/imgurwidget.cpp M +5 -0 imgur/imgurwindow.cpp M +5 -2 imgur/imgurwindow.h M +1 -7 imgur/mpform.cpp M +1 -0 imgur/plugin_imgur.cpp http://commits.kde.org/kipi-plugins/6e02be27e833442028ac2be4f4737d6a9e2493e4 Only anonymous mode work currently -> reopened. Maik Maik, It still valid ? We will need OAuth2 in kipi-plugins to deal with this problem ? Gilles Yes, we need OAuth2 to close this bug. Only anonymous upload work currently. Maik Created attachment 99772 [details] Patch to add a oauth2 library to libkipiplugins This patch adds the code from https://github.com/pipacs/o2 with some changes (https://github.com/pipacs/o2/pull/57) to fix building. Several workarounds were needed to integrate it, but it's not too bad. Hi Fabian, Perfect, we will integrate it to libkipiplugins just after 5.0.0 final release planed this week end. What about to use OAuth2 API in imgur tool ? Gilles Caulier > What about to use OAuth2 API in imgur tool ?
I'll port my rewrite of the imgur plugin to make use of that library soon.
I'll have to implement some missing features as well, so it may take a few days.
Fabian, really great. Thank you! Maik Created attachment 99897 [details] Add o2 library from https://github.com/pipacs/o2 Created attachment 99898 [details]
Fix o2 to be compatible with imgur
Created attachment 99900 [details]
Rewrite imgur plugin to work with OAuth2
Rewrite done, tested multiple times and it seems to work fine.
It took a bit longer due to some weirdnesses in the imgur OAuth implementation that didn't work well with o2.
Tested Fabian Vogt's patch for imgur and confirmed to work here on Slackware 14.2 suggestion: is it possible to bump all cmake minimum to 3.0.0 so that it's consistent in all digiKam/kipi-plugins code? Thanks I use Chromium as default browser. After logging in, there is an error box that you are not authorized. But the upload is done. With Firefox, there is no error message. Maik (In reply to Maik Qualmann from comment #23) > I use Chromium as default browser. After logging in, there is an error box > that you are not authorized. But the upload is done. With Firefox, there is > no error message. > > Maik I had the same issue once, too, but I was unable to reproduce it again after some changes. I don't understand how it happens at all, as the same QNetworkReply apparently emits both success and failure :-/ I just can't reproduce the issue, however I try it. If someone can, please provide the log and, if possible, a wireshark packet trace (which might contain sensitive information as the communication with 127.0.0.1 is not encrypted). Fabian, If Oauth2 integartion work fine with Imgur tool, we will integrate your patches into git/master for next 5.1.0 planned in August. What about other web service tools, as google, facebook, flickr, etc ? Can you evaluate : - which tool can use Oauth2 API. - The complexity to patch current implementation of relevant tools. Thanks in advance Gilles Caulier (In reply to caulier.gilles from comment #26) > Fabian, > > If Oauth2 integartion work fine with Imgur tool, we will integrate your > patches into git/master for next 5.1.0 planned in August. The o2 integration into libkipiplugins works fine and even if I can't figure out what causes the bogus error, it's still much better than the current state, which does only allow anonymous uploads. > What about other web service tools, as google, facebook, flickr, etc ? Can > you evaluate : > > - which tool can use Oauth2 API. > - The complexity to patch current implementation of relevant tools. Generally I prefer the "if it's not broken, don't fix it" approach. The facebook plugin works fine, it just needs to be updated to use the 2.6 API instead of 2.4 (a simple sed should do). I don't know about the other plugins, I haven't tested them yet. Which of them are known to be broken? For ex : Google: https://bugs.kde.org/show_bug.cgi?id=348274 https://bugs.kde.org/show_bug.cgi?id=339355 https://bugs.kde.org/show_bug.cgi?id=348277 Facebook: https://bugs.kde.org/show_bug.cgi?id=361699 In general, if authentification can be simplifed in all webservice suppported by OAuth2, this will be a great improvement. Gilles Caulier Maik, Are you agree to include patches from Fabian for next 5.1.0 releases ? Also do you think that O2 lib API can be used on some other kipi tools ? Facebook for ex, need serious improvements about the login which is currently not suitable ? Gilles Yes I agree. I will apply the patch on the weekend. Maik Git commit 1ca948503bb095df1334131481811a2141697edf by Maik Qualmann. Committed on 17/07/2016 at 10:38. Pushed by mqualmann into branch 'master'. apply patch #99897 from Fabian Vogt to add o2 library from https://github.com/pipacs/o2 M +1 -2 CMakeLists.txt D +0 -33 cmake/modules/FindQtKOAuth.cmake M +38 -1 common/libkipiplugins/CMakeLists.txt A +16 -0 common/libkipiplugins/o2/CHANGES.md A +31 -0 common/libkipiplugins/o2/CMakeLists.txt A +23 -0 common/libkipiplugins/o2/LICENSE A +212 -0 common/libkipiplugins/o2/README.md A +57 -0 common/libkipiplugins/o2/acknowledgements.md A +9 -0 common/libkipiplugins/o2/examples/CMakeLists.txt A +43 -0 common/libkipiplugins/o2/examples/facebookdemo/CMakeLists.txt A +16 -0 common/libkipiplugins/o2/examples/facebookdemo/facebookdemo.pro A +119 -0 common/libkipiplugins/o2/examples/facebookdemo/fbdemo.cpp [License: UNKNOWN] * A +35 -0 common/libkipiplugins/o2/examples/facebookdemo/fbdemo.h [License: UNKNOWN] * A +71 -0 common/libkipiplugins/o2/examples/facebookdemo/main.cpp [License: UNKNOWN] * A +5 -0 common/libkipiplugins/o2/examples/sialis/README.md A +19 -0 common/libkipiplugins/o2/examples/sialis/main.cpp [License: UNKNOWN] * A +128 -0 common/libkipiplugins/o2/examples/sialis/main.qml [License: UNKNOWN] * A +5 -0 common/libkipiplugins/o2/examples/sialis/qml.qrc A +- -- common/libkipiplugins/o2/examples/sialis/sialis.icns A +24 -0 common/libkipiplugins/o2/examples/sialis/sialis.pro A +40 -0 common/libkipiplugins/o2/examples/sialis/tweetmodel.cpp [License: UNKNOWN] * A +38 -0 common/libkipiplugins/o2/examples/sialis/tweetmodel.h [License: UNKNOWN] * A +57 -0 common/libkipiplugins/o2/examples/sialis/twitterapi.cpp [License: UNKNOWN] * A +45 -0 common/libkipiplugins/o2/examples/sialis/twitterapi.h [License: UNKNOWN] * A +43 -0 common/libkipiplugins/o2/examples/twitterdemo/CMakeLists.txt A +111 -0 common/libkipiplugins/o2/examples/twitterdemo/main.cpp [License: UNKNOWN] * A +135 -0 common/libkipiplugins/o2/examples/twitterdemo/tweeter.cpp [License: UNKNOWN] * A +41 -0 common/libkipiplugins/o2/examples/twitterdemo/tweeter.h [License: UNKNOWN] * A +14 -0 common/libkipiplugins/o2/examples/twitterdemo/twitterdemo.pro A +103 -0 common/libkipiplugins/o2/src/CMakeLists.txt A +22 -0 common/libkipiplugins/o2/src/o0abstractstore.h [License: UNKNOWN] * A +126 -0 common/libkipiplugins/o2/src/o0baseauth.cpp [License: UNKNOWN] * A +120 -0 common/libkipiplugins/o2/src/o0baseauth.h [License: UNKNOWN] * A +61 -0 common/libkipiplugins/o2/src/o0globals.h [License: UNKNOWN] * A +14 -0 common/libkipiplugins/o2/src/o0requestparameter.h [License: UNKNOWN] * A +44 -0 common/libkipiplugins/o2/src/o0settingsstore.cpp [License: UNKNOWN] * A +42 -0 common/libkipiplugins/o2/src/o0settingsstore.h [License: UNKNOWN] * A +225 -0 common/libkipiplugins/o2/src/o0simplecrypt.h [License: BSD] A +379 -0 common/libkipiplugins/o2/src/o1.cpp [License: UNKNOWN] * A +124 -0 common/libkipiplugins/o2/src/o1.h [License: UNKNOWN] * A +18 -0 common/libkipiplugins/o2/src/o1dropbox.h [License: UNKNOWN] * A +18 -0 common/libkipiplugins/o2/src/o1flickr.h [License: UNKNOWN] * A +22 -0 common/libkipiplugins/o2/src/o1freshbooks.h [License: UNKNOWN] * A +57 -0 common/libkipiplugins/o2/src/o1requestor.cpp [License: UNKNOWN] * A +61 -0 common/libkipiplugins/o2/src/o1requestor.h [License: UNKNOWN] * A +20 -0 common/libkipiplugins/o2/src/o1timedreply.cpp [License: UNKNOWN] * A +25 -0 common/libkipiplugins/o2/src/o1timedreply.h [License: UNKNOWN] * A +18 -0 common/libkipiplugins/o2/src/o1twitter.h [License: UNKNOWN] * A +417 -0 common/libkipiplugins/o2/src/o2.cpp [License: UNKNOWN] * A +170 -0 common/libkipiplugins/o2/src/o2.h [License: UNKNOWN] * A +90 -0 common/libkipiplugins/o2/src/o2facebook.cpp [License: UNKNOWN] * A +18 -0 common/libkipiplugins/o2/src/o2facebook.h [License: UNKNOWN] * A +13 -0 common/libkipiplugins/o2/src/o2gft.cpp [License: UNKNOWN] * A +14 -0 common/libkipiplugins/o2/src/o2gft.h [License: UNKNOWN] * A +17 -0 common/libkipiplugins/o2/src/o2hubic.cpp [License: UNKNOWN] * A +17 -0 common/libkipiplugins/o2/src/o2hubic.h [License: UNKNOWN] * A +58 -0 common/libkipiplugins/o2/src/o2reply.cpp [License: UNKNOWN] * A +59 -0 common/libkipiplugins/o2/src/o2reply.h [License: UNKNOWN] * A +81 -0 common/libkipiplugins/o2/src/o2replyserver.cpp [License: UNKNOWN] * A +33 -0 common/libkipiplugins/o2/src/o2replyserver.h [License: UNKNOWN] * A +193 -0 common/libkipiplugins/o2/src/o2requestor.cpp [License: UNKNOWN] * A +82 -0 common/libkipiplugins/o2/src/o2requestor.h [License: UNKNOWN] * A +254 -0 common/libkipiplugins/o2/src/o2simplecrypt.cpp [License: BSD] A +125 -0 common/libkipiplugins/o2/src/o2skydrive.cpp [License: UNKNOWN] * A +18 -0 common/libkipiplugins/o2/src/o2skydrive.h [License: UNKNOWN] * A +21 -0 common/libkipiplugins/o2/src/o2surveymonkey.cpp [License: UNKNOWN] * A +14 -0 common/libkipiplugins/o2/src/o2surveymonkey.h [License: UNKNOWN] * A +69 -0 common/libkipiplugins/o2/src/oxtwitter.cpp [License: UNKNOWN] * A +37 -0 common/libkipiplugins/o2/src/oxtwitter.h [License: UNKNOWN] * The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kipi-plugins/1ca948503bb095df1334131481811a2141697edf Git commit d2250a7d2cdef4086ca7f0bbd9787cc021be59de by Maik Qualmann. Committed on 17/07/2016 at 10:42. Pushed by mqualmann into branch 'master'. apply patch #99898 from Fabian Vogt to fix o2 to be compatible with imgur M +6 -2 common/libkipiplugins/o2/src/o2.cpp http://commits.kde.org/kipi-plugins/d2250a7d2cdef4086ca7f0bbd9787cc021be59de Git commit c0336e003d91577a84d587d69ee77ff1fb7c78e0 by Maik Qualmann. Committed on 17/07/2016 at 10:47. Pushed by mqualmann into branch 'master'. apply patch #99900 from Fabian Vogt to rewrite imgur plugin to work with OAuth2 FIXED-IN: 5.1.0 M +1 -22 imgur/CMakeLists.txt A +312 -0 imgur/imgurapi3.cpp [License: UNKNOWN] * A +169 -0 imgur/imgurapi3.h [License: GPL (v2+)] M +76 -96 imgur/imgurimageslist.cpp M +18 -33 imgur/imgurimageslist.h D +0 -57 imgur/imgurresponses.json D +0 -425 imgur/imgurtalker.cpp D +0 -111 imgur/imgurtalker.h D +0 -158 imgur/imgurtalker_common.h D +0 -289 imgur/imgurtalkerauth.cpp D +0 -112 imgur/imgurtalkerauth.h D +0 -322 imgur/imgurwidget.cpp D +0 -92 imgur/imgurwidget.h M +171 -199 imgur/imgurwindow.cpp M +24 -34 imgur/imgurwindow.h D +0 -166 imgur/mpform.cpp D +0 -62 imgur/mpform.h The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/kipi-plugins/c0336e003d91577a84d587d69ee77ff1fb7c78e0 |