[Differential] [Requested Changes To] D2621: GitHub Two Factor Authentication

kfunk (Kevin Funk) noreply at phabricator.kde.org
Mon Aug 29 19:57:18 UTC 2016


kfunk requested changes to this revision.
kfunk added a reviewer: kfunk.
kfunk added a comment.
This revision now requires changes to proceed.


  @Other devs: If someone has 2FA enabled: Please give it a run and check whether it works for you.

INLINE COMMENTS

> ghresource.cpp:78
> +
> +void Resource::twoFactorAuthenticate(const QString &code) {
> +    auto job = getHttpAuthJob(m_tfHttpHeader + "\nX-GitHub-OTP: " + code);

Newline before `{`

> ghresource.cpp:155
>  
> +    auto metaData = qobject_cast<KIO::StoredTransferJob*>(job)->metaData();
> +    if (metaData["responsecode"] == QStringLiteral("401")) {

`const ...`

> ghresource.cpp:157
> +    if (metaData["responsecode"] == QStringLiteral("401")) {
> +        auto& header = metaData["HTTP-Headers"];
> +        if (header.contains("x-github-otp: required;", Qt::CaseInsensitive)) {

`const auto&`

> ghresource.cpp:158
> +        auto& header = metaData["HTTP-Headers"];
> +        if (header.contains("x-github-otp: required;", Qt::CaseInsensitive)) {
> +          m_tfHttpHeader = qobject_cast<KIO::StoredTransferJob*>(job)->outgoingMetaData()["customHTTPHeader"];

Isn't the casing fixed? Can it really vary?

REPOSITORY
  rKDEVELOP KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D2621

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: ial0, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160829/f0e7f905/attachment-0001.html>


More information about the KDevelop-devel mailing list