edited dilatometer
[matches/MCTX3420.git] / irc / 2013-10-20_gmail_chat
1 # Conversation held after creating the Week 12 progress report in google docs
2  
3 Jeremy Tan joined group chat.
4 me
5 9:10 PM
6 Heh, I didn't expect everyone to start editing it so fast
7 Jeremy Tan
8 9:11 PM
9 hahah
10 what is this madness, working on it the day before
11 me
12 9:11 PM
13 Crazy
14 Jeremy: You weren't in IRC, but I hacked together a MySQL authentication thing to work with UserCake.
15 Jeremy Tan
16 9:11 PM
17 oO
18 me
19 9:11 PM
20 It seems to work well...
21 Although currently any random can register for an account.
22 Jeremy Tan
23 9:12 PM
24 Sorry, I was really busy sorting out the case study and my databases project (both due today)
25 me
26 9:12 PM
27 That's ok
28 Ironic... I spent all of today learning about a database :P
29 Jeremy Tan
30 9:13 PM
31 I was considering using php to redirect the user if they weren't logged it
32 in
33 but since you got this working, great
34 :P
35 Never heard of usercake though
36 me
37 9:14 PM
38 http://usercake.com/
39 It does need some modification
40 For some reason it stores privelage levels in a seperate table to the main users which is a pain for checking if someone is admin or not
41 Jeremy Tan
42 9:14 PM
43 how do you interact with the db? does mysql have a C api?
44 me
45 9:15 PM
46 And of course it has single user registration, so I'm currently trying to make a mass registration form that only the admin can use
47 Yes, MySQL has a C API
48 Jeremy Tan
49 9:15 PM
50 that must be a pain to work with
51 me
52 9:15 PM
53 Actually not really
54 Jeremy Tan
55 9:15 PM
56 Really?
57 I was trying something similar with sqlite and the django db
58 me
59 9:15 PM
60 At least just for the simple task of looking up a user
61 Jeremy Tan
62 9:16 PM
63 ah
64 I got the django one as far as getting the user entry
65 but then the data is base64 encoded
66 and uses sha256 hashing
67 effort
68 me
69 9:16 PM
70 Ahaha
71 PHP has the same crypt() function as posix which made it easier
72 Jeremy Tan
73 9:16 PM
74 yeah, except crypt is really insecure
75 but I guess they dont care
76 so meh
77 me
78 9:17 PM
79 Someone would have to get access to the database to even look at the hashes first
80 But MySQL doesn't have a great reputation either
81 Jeremy Tan
82 9:19 PM
83 well that's where the problem lies anyway
84 it's all about if the user gets access to the db, then you're in a really bad position if you've used crypt
85 mysql has better performance than sqlite though (probably)
86 About the control page - we haven't differentiated between a 'strain' and an 'explode' experiment. What controls are also necessary anyway? e.g do we even want the user to be able to control the pressure for the explode version?
87 me
88 9:20 PM
89 The easiest way to do it is to just have "strain/explode" switch the relay and otherwise use the same controls, I'm not sure if that's OK or not though
90 Jeremy Tan
91 9:23 PM
92 Okay
93 How does that UMS affect the current api
94 and user control
95 /login
96 me
97 9:23 PM
98 Not at all
99 Jeremy Tan
100 9:23 PM
101 So is login handled by that cake or the api (or both)?
102 me
103 9:24 PM
104 It's entirely seperate, except you can pass a mysql authentication method to the server
105 UserCake handles it's own login
106 Our API still has seperate login
107 It just accesses the same database
108 Jeremy Tan
109 9:24 PM
110 ahh
111 very similar to the django idea then
112 user cake is in php?
113 me
114 9:24 PM
115 Yes, I think that's the best way to do it anyway
116 And yes, UserCake is PHP
117 Jeremy Tan
118 9:26 PM
119 Yeah
120 Django's annoying to set up, and then you have to worry about python too
121 'Yet antoher*'
122 hahaha
123 me
124 9:26 PM
125 Hmm, what's a good justification for it
126 Jeremy Tan
127 9:27 PM
128 One thing though
129 we probably have to change cookie handling in the api
130 usercake probably stores its own cookies
131 me
132 9:27 PM
133 Maybe, and yes
134 Jeremy Tan
135 9:27 PM
136 and that will definitely screw up things
137 me
138 9:27 PM
139 Maybe... probably...
140 Jeremy Tan
141 9:27 PM
142 but I was planning on doing something about taht anyway
143 me
144 9:27 PM
145 Iceweasel seems to always send the nameless cookie first...
146 Jeremy Tan
147 9:27 PM
148 oh yeah, that's right
149 me
150 9:27 PM
151 So I just truncated the cookie at the first ';'
152 Jeremy Tan
153 9:28 PM
154 yesterday I limited it
155 nah
156 it snprintfs exactly the size of the control cookie
157 so if the cookie's first, then it's all good
158 me
159 9:28 PM
160 I think so
161 But when you logout I think it sets the cookie to "0"
162 Jeremy Tan
163 9:29 PM
164 yeah
165 shouldn't be an issue since it won't match
166 but I was thinking of switching to a named cookie
167 PHP can't handle the nameless cookie though (something I found out today)
168 me
169 9:29 PM
170 It shouldn't but it feels wrong...
171 Switching to a named cookie is probably a good idea
172 Jeremy Tan
173 9:29 PM
174 yeah
175 I'll try that now
176 Jeremy Tan
177 9:33 PM
178 usercake's not on git, is it?
179 me
180 9:34 PM
181 Not yet, it's on my local machine in a new branch
182 Should I push it now?
183 Jeremy Tan
184 9:34 PM
185 ah
186 that would be good if you could
187 Jeremy Tan
188 9:43 PM
189 You know you've spent too long writing javascript when you default to writing !==
190 me
191 9:43 PM
192 Ahahaha
193 me
194 9:57 PM
195 I think I'll call it quits for now
196 Jeremy Tan
197 9:58 PM
198 Okay
199 me
200 9:58 PM
201 I'll try upload this chat log since we didn't use IRC
202 Jeremy Tan
203 9:58 PM
204 See you tomorrow
205 me
206 9:58 PM
207 Bye

UCC git Repository :: git.ucc.asn.au