Live data from Hacker News

ShowHN: GetURL - A CLI tool to get a public link for any file

github.com

51–53 of 53 posts

Re: ShowHN: GetURL - A CLI tool to get a public link for any file

#51
post #47

Nice work and very handy. I hadn't come across filepicker.io before and reading through the geturl code something jumped out at me: APIKEY = check_output(['curl', '--silent', "%(fpurl)s/getKey?email=%(email)s" % {'fpurl': FPAPIURL, 'email': email}]) From that, it looks like any random person can fill up your filepicker.io space providing they have your API key or know the email address you used to register the accoun…

One of the founders, just wanted to reply and say, yes, you are entirely right. We put up that endpoint for a separate purpose, didn't expect people to find it (underestimating people is clearly a bad strategy) and will be locking it down to require a password to create/find a apikey. In general, the apikey doesn't actually provide very much security as is; by it's public by it's very nature as you have to put it cli…

Will those security changes break GetURL?

Also, isn't it normal to check the referrer when using API keys? That's what Facebook does -- API keys only work from certain domains, which effectively restricts their access. The downside is that you need to maintain separate API keys for every domain (staging, sandbox, etc), but the advantage is that they don't rely on the honor system :P

Re: ShowHN: GetURL - A CLI tool to get a public link for any file

#52

Since I have web hosting and use GitHub, here's my method: cp file_name ~/Projects/2012/ajf.me/ajf.me/imagedump/ && cd ~/Projects/2012/ajf.me/ajf.me/ && git add imagedump && git commit -m 'new file' && cd .. && ./update.sh Elaborate, sure, but it does the job. update.sh runs git push and then does an SSH into my server and a git pull. (Because I'm too lazy to actually set up git on my own server)

You don't need to set up a git server on your own sever. Just create a git repo, add it as a remote revenue to your local repo, and use ssh+git to push changes directly. But if you have your own server, why don't you just scp it directly there? That's the piece most people are missing.

SCP is really the solution here. But to be fair, I only discovered scp after a year or two of CLI work. I might have been tempted to hack something together like Taze's solution in my earlier days
Post reply on HN