Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API connect broken, insecure #23

Open
ryantate opened this issue Jan 12, 2020 · 6 comments
Open

API connect broken, insecure #23

ryantate opened this issue Jan 12, 2020 · 6 comments

Comments

@ryantate
Copy link

ryantate commented Jan 12, 2020

Won't connect to Tumblr. Tumblr end is fine, author's server returns a code to put into emacs, albeit over an unencrypted http link, which is pretty unforgivable in 2020. Anyway, once you put in the code, it still doesn't work. Even if you do the "forget" command, and try it all again, it's just an endless loop of broken with no way to debug (sparse use of Messages buffer) :-\

@ryantate ryantate changed the title Project broken, insecure API connect broken, insecure Jan 12, 2020
@mooseyboots
Copy link

i suppose the API has changed. i would also love to be able to post to interact with tumblr from emacs, especially since they disabled their post by email feature.

@mooseyboots
Copy link

i got tumblesocks working again by setting:
(setq oauth-nonce-function #'oauth-internal-make-nonce)

as per https://danzorx.tumblr.com/post/36832512247/a-weird-oauth-el-issue-when-trying-to-set-up, mentioned in another issue.

@gargle
Copy link

gargle commented Dec 21, 2022

Tumblesocks doesn't work for me. On WSL with GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0) of 2022-12-20, modified by Debian tumblesocks-api-test-auth generates a nil token. The URL is: https://www.tumblr.com/oauth/authorize?oauth_token=nil.

elpa gives me the following dependencies: oauth-20130128.151, htmlize-20210825.2150, markdown-mode-20221105.236.

I read https://billisalive.tumblr.com/ and https://danzorx.tumblr.com/post/36832512247/a-weird-oauth-el-issue-when-trying-to-set-up but couldn't get tumblesocks to work.

@gargle
Copy link

gargle commented Dec 26, 2022

On my debian box I'm able to copy the code from the tumblr webpage, but then I get the "Looks likeomething broke." error message. I get an error in oauth.el: hmac-sha1: key QuH.....th1SK must be unibyte.

@gargle
Copy link

gargle commented Dec 29, 2022

I am able to login onto tumblr with tumblesocks but I have to replace
oauth-build-signature-hmac-sha1 with

(defun oauth-build-signature-hmac-sha1 (req secret)
  "Returns the signature for the given request object"
  (let* ((token (oauth-request-token req))
         (key (concat secret "&" (when token (oauth-t-token-secret token))))
         (hmac-params
          (list (string-to-unibyte (encode-coding-string key 'utf-8 t))
                (string-to-unibyte (encode-coding-string
                 (oauth-build-signature-basestring-hmac-sha1 req) 'utf-8 t)))))
    (if oauth-hmac-sha1-param-reverse (setq hmac-params (reverse hmac-params)))
    (base64-encode-string (apply 'hmac-sha1 hmac-params))))

I receive a Hello, gargle! Tumblesocks is working properly.

I also had to change

(flet ((shr-ensure-paragraph () 0))

in tumblesocks-view-insert-parsed-html-fragment with

(cl-flet ((shr-ensure-paragraph () 0))

I have a dashboard now.

I haven't throughly tested tumblesocks. Perhaps there are more errors.

@teledyn
Copy link

teledyn commented Jan 20, 2025

Using the package from elpa downloaded today, everything worked except that error on shr-ensure-paragraph for which the above insertion of 'cl-' did the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants