Res facta quae tamen fingi potuit (
pauamma) wrote in
dw_dev_training2011-11-21 05:27 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
Entry tags:
Question thread #3
It's time for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.
no subject
I'm stuck on, I think, a fairly easy question, that I nevertheless can't find an answer to.
To use the Dreamwidth API (and the Pinboard one), I need the user's password. My script is PHP, and I tell people installing it to do so outside of the public folders, to reduce problems, but even though, I'm not particularly happy at having to store the password, not even encrypted, in the script. Everything I can find about storing passwords securely is about sites that ask you to login, but I do the opposite: I send the password outside. (Unless I'm a dunce and there is a totally different solution I didn't think of.)
I need to store the script on a web server, because the point is for it to run automatically without human input.
Anyone has the beginning of a solution for me?
no subject
(*) If your script lives on a shared server, which is common for PHP, you should make sure that the server operator enforces separation between customers, eg by having a separate Unix account for each virtual domain's directory tree or something along those lines.
no subject
That's indeed what I meant.
you should make sure that the server operator enforces separation between customers
Mine does, and so does the host I recommend, but I'll have to add this to the requirements, then.
Thanks!
no subject
Would it work to store the login cookies, instead of the passwords?
no subject
I have no idea! XD I'm using the script as a learning process actually, and I'm making it up as I go along, probably reinventing the wheel a couple of times.
I'm going to keep your suggestion in mind for when I have time to tackle the documentation. Thanks!
no subject
no subject
no subject
And hey, if you open the bug, make it needs-design and lay out what the user-facing bits need to do/be/say/etc.
no subject
[edit: Which is to say, I implemented it without an OAuth-specific library. I used libraries for URI escaping, URI parsing, HMAC-SHA1 encoding and base64 encoding.]