Can't add services to diaspora pod - diaspora

I've setup a diaspora pod on Debian box, diaspora.ivvy.ru, but can't seem to figure out why "connect to..." links not showing up under services tab.
I register a twitter app, copy-paste twitter consumer key/secret to application.yml and oauth_key.yml.
I cloned diaspora from github just yesterday.
I think it's ssl issue but there are no signs of failure in log files or anything and my cert is accepted by all modern browsers.
My cert is a startssl class 1 one.
I'm not really familiar with ruby so hacking code is quite a problem for me.
Any help would be appreciated.

I solved the issue.
There was quite misleading syntax in oauth_keys.yml:
tumblr:
consumer_key: <%= AppConfig['tumblr_consumer_key'] %>
consumer_secret: <%= AppConfig['tumblr_consumer_secret'] %>
I thought you need to just replace tumblr_consumer_key with your own key but the correct syntax is:
tumblr:
consumer_key: 'enter_your_key'
consumer_secret: 'enter_your_secret'
I think the diaspora devs should've pointed that out in docs somewhere.

Related

can't get ruby omniauth-ebay-oauth gem example code working

I am trying to setup and use omniauth-ebay-oauth (https://github.com/evilmartians/omniauth-ebay-oauth) gem to use eBay rest APIs in my app without success.
I set up the required environment variables and run the example code but get a message saying "Sinatra doesn’t know this ditty.". It does not recognise the '/auth/ebay' route, not sure if I have to declare that route myself nor what to put in it if I do. I'm new to ruby and Sinatra so do apologise if this is just something silly and obvious that I'm missing.
require 'omniauth-ebay-oauth'
use Rack::Session::Cookie
use OmniAuth::Builder do
provider :ebay_oauth, ENV['EBAY_CLIENT_ID'], ENV['EBAY_CLIENT_SECRET'],
callback_url: ENV['EBAY_RU_NAME'], name: 'ebay'
end
get '/' do
redirect '/auth/ebay'
end
get '/auth/ebay/callback' do
"Hello, #{request.env['omniauth.auth'].dig('info', 'name')}"
end
I appreciate any help and insight in getting this working. I've googled everywhere and asking here as my last resort.
I opened an issue on the GitHub repository and the gem creator replied in 3 hours. Totally life saver. I will post the solution here to help others.
It is because of security settings of OmniAuth 2.x.
Add the following line at the top, after requires:
OmniAuth.config.allowed_request_methods += %i[get]
This worked like a charm and I can now move forwards with the project.

Kestrel HTTPS BadHttpRequestException

Over HTTP and inside of Visual Studio it is working fine. However, when I attempt to hit the endpoint over HTTPS I'm seeing this error and I'm not entirely sure how to figure out the problem:
info: Microsoft.AspNetCore.Server.Kestrel[17]
Connection id "0HL36O0ESIPBQ" bad request data: "Invalid request line: <0x16><0x03><0x01><0x00><0x83><0x01><0x00><0x00><0x7F><0x03><0x01>X<0xC1><0x07><0xDC><0x9E>~Y<0x05><0x13><0xC1><0xF4>^J<0xCF><0xAB><0x11><0xC3>R[<0x87><0x1D>..."Microsoft.AspNetCore.Server.Kestrel.BadHttpRequestException: Invalid request line: <0x16><0x03><0x01><0x00><0x83><0x01><0x00><0x00><0x7F><0x03><0x01>X<0xC1><0x07><0xDC><0x9E>~Y<0x05><0x13><0xC1><0xF4>^J<0xCF><0xAB><0x11><0xC3>R[<0x87><0x1D>
Fiddler gives me this:
System.IO.IOException The handshake failed due to an unexpected packet format.
My gut tells me this has to do with moving from dotnet core 1.0.1 to 1.1.0. This was all working fine before that point, but it is equally likely I screwed something else up and I'm just not sure what! :)
I'll add to Paul's hint in the form of an answer.
The .UseHttps class is in the "Microsoft.AspNetCore.Server.Kestrel.Https" module, which can be added by searching for "usehttps" in the Package Manager UI or by adding it to your project.json file. Note that at the time of this writing, version 1.1.1 is now available for ASP.NET Core, so be sure to choose the version you need.
Not sure it will solve my problem, but perhaps it will solve the problem of someone else that reads this.
Ok. I'll answer my own question. It turns out I just needed to add .UseHttps to my WebHostBuilder in program.cs:
.UseKestrel(options =>
{
options.AddServerHeader = false;
options.UseHttps("MyPfx", "MyPassword");
})
I guess I'm a little confused how this was working previously without this but hey, it works now!

Personal webpage set in https without my interaction. How to undo it?

i've got a little problème im not even abble to clearly formulate.
And this didnt helped me finding an answer on the internet.
So I rely on you people if somehow you have allready encouter this problem or either simply had an idea of where this could came from.
Here is my problem : When I try to connect on my personal website the navigator (Chrome or Firefox, haven't test with others) told me the certificate of security is invalid and is only valid for ssl1.ovh.net (ovh is my web hosting-provider).
The error code is : ssl_error_bad_cert_domain.
Well if any of you has an idea of where this could came from ?
Here is my website if some wants to have a look : maelmayon.fr
Thank you for reading it, I hope someone could help me.
Even though this is not a solution to the underlying problem, this is a nice workaround.
Either add a security exception in your browser, or explicitly link via http://. The security violation report should only show when trying to connect via https://.
I think you'd have to contact your provider for a shared SSL certificate to enable connection via https

Unable to upload files to AWS S3 buckets using CORS

I was just trying out the example which is specified in this blog, but I am getting this error "Could not contact signing script. Status = 404". I followed all the steps specified in the blog and also carefully changed the CORS configuration in AWS management Console too. I am not able to figure out the problem. Kindly help me out.
Here is the blog link http://www.ioncannon.net/programming/1539/direct-browser-uploading-amazon-s3-cors-fileapi-xhr2-and-signed-puts/
I faced the same problem you did trying to follow the example in this blog post. I wrote an article showing everything I had to do to make it work for me.
https://blog.pjam.me/posts/direct-upload-to-s3/
Hope it'll work for you.

How to set up gist to work with an existing token?

I've installed gist Ruby gem. However, I'm having trouble setting up my gist to work with an existing Github account and taken. I've read the instructions in here. However, I'm lost on the next steps I should try to get the authentication working despite following the instructions.
------ Update--------------------------
Found this issue to be open in its Github page: https://github.com/defunkt/gist/issues
Not much I can do at this point.
Thanks in advance for your insights!
You should use your github password, not token: https://github.com/defunkt/gist#authentication

Resources