Merge lp:~black-ice-wizard/psiphon/sprint3-595232 into lp:psiphon

Proposed by Cheskidov Vladimir
Status: Merged
Approved by: Rod
Approved revision: 125
Merged at revision: 138
Proposed branch: lp:~black-ice-wizard/psiphon/sprint3-595232
Merge into: lp:psiphon
Diff against target: 232 lines (+157/-4) (has conflicts)
4 files modified
trunk/www/config.php (+2/-0)
trunk/www/includes/lang.php (+144/-0)
trunk/www/invite-m.php (+7/-4)
trunk/www/invite.php (+4/-0)
Text conflict in trunk/www/includes/lang.php
To merge this branch: bzr merge lp:~black-ice-wizard/psiphon/sprint3-595232
Reviewer Review Type Date Requested Status
Adam Kruger group review Needs Fixing
Rod Pending
Review via email: mp+35379@code.launchpad.net

This proposal supersedes a proposal from 2010-08-30.

To post a comment you must log in.
Revision history for this message
Rod (rod-psiphon) wrote : Posted in a previous version of this proposal

This was a team review. Here are our comments:

- The "These invites expire in 5 days" ends up repeated twice in send invitations. Also, the text isn't translated in one case: ("td colspan="2" class="warning">These invites expire in <?=$config["invitation_ttl"]/86400?>" in invite-m.php). Just remove that case.

- Same selenium issues as in https://code.launchpad.net/~nurlan0000/psiphon/sprint3-610191/+merge/33761.

- Note: you probably don't want your email password in public source code -- even for test account.

- "This link expires in %d days." would be better at the top of the email, after Welcome.

- Would prefer a symbolic value for 86400 --> e.g., SECONDS_IN_DAY defined in config.php.

review: Needs Fixing
Revision history for this message
Cheskidov Vladimir (black-ice-wizard) wrote : Posted in a previous version of this proposal

I do not understand the item:
> - Note: you probably don't want your email password in public source code --
> even for test account.
Can you please explain, what exactly I need to correct here?

In item:
> - "This link expires in %d days." would be better at the top of the email,
> after Welcome.
I have put this string to the top, and changed it according to the your recomendations in the "Note: This invitation expires in% d days."

Revision history for this message
Cheskidov Vladimir (black-ice-wizard) wrote : Posted in a previous version of this proposal

In additional:
Our testers have a ticket (Automated testing), in which they should do tests on all Psiphon functional.
So I did not add the tests in my ticket.

Revision history for this message
Adam Kruger (adam-kruger) wrote :

Code review comments:

- Since automated testing is being done elsewhere, please do not submit the following files for merging:
trunk/testing/selenium_scripts/invites_expiration_text.html
trunk/testing/selenium_scripts/selenium_test_suite_595232.html

review: Needs Fixing (group review)
125. By Nurlan <ubuntu@ubuntu-desktop>

remove obsolete tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'trunk/www/config.php'
2--- trunk/www/config.php 2010-06-28 20:44:20 +0000
3+++ trunk/www/config.php 2010-10-21 05:41:11 +0000
4@@ -43,6 +43,8 @@
5 substr(getenv("SCRIPT_NAME"), 0,
6 strrpos(getenv("SCRIPT_NAME"), "/"));
7
8+$config["seconds_in_day"] = 86400; // seconds: 86400 * days
9+
10 // invitation is valid for 5 days, then it's deleted if not used
11 $config["invitation_ttl"] = 86400 * 5; // seconds: 86400 * days
12
13
14=== modified file 'trunk/www/includes/lang.php'
15--- trunk/www/includes/lang.php 2010-10-14 16:26:29 +0000
16+++ trunk/www/includes/lang.php 2010-10-21 05:41:11 +0000
17@@ -1704,6 +1704,7 @@
18 'invitation_body' => array(
19 'en' => "Welcome to Psiphon!
20
21+<<<<<<< TREE
22 Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
23
24 You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
25@@ -1804,6 +1805,136 @@
26 %s
27
28 Команда Psiphon",
29+=======
30+Note: This invitation expires in %d days.
31+
32+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
33+
34+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
35+
36+Click this link to create your new Psiphon account:
37+
38+%s
39+
40+The Psiphon Team",
41+ 'fa' => "Welcome to Psiphon!
42+
43+Note: This invitation expires in %d days.
44+
45+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
46+
47+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
48+
49+Click this link to create your new Psiphon account:
50+
51+%s
52+
53+The Psiphon Team",
54+ 'ru' => "Welcome to Psiphon!
55+
56+Note: This invitation expires in %d days.
57+
58+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
59+
60+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
61+
62+Click this link to create your new Psiphon account:
63+
64+%s
65+
66+The Psiphon Team",
67+ 'uz' => "Welcome to Psiphon!
68+
69+Note: This invitation expires in %d days.
70+
71+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
72+
73+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
74+
75+Click this link to create your new Psiphon account:
76+
77+%s
78+
79+The Psiphon Team",
80+ 'tk' => "Welcome to Psiphon!
81+
82+Note: This invitation expires in %d days.
83+
84+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
85+
86+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
87+
88+Click this link to create your new Psiphon account:
89+
90+%s
91+
92+The Psiphon Team",
93+ 'cn' => "Welcome to Psiphon!
94+
95+Note: This invitation expires in %d days.
96+
97+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
98+
99+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
100+
101+Click this link to create your new Psiphon account:
102+
103+%s
104+
105+The Psiphon Team",
106+ 'ar' => "Welcome to Psiphon!
107+
108+Note: This invitation expires in %d days.
109+
110+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
111+
112+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
113+
114+Click this link to create your new Psiphon account:
115+
116+%s
117+
118+The Psiphon Team",
119+ 'vt' => "Welcome to Psiphon!
120+
121+Note: This invitation expires in %d days.
122+
123+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
124+
125+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
126+
127+Click this link to create your new Psiphon account:
128+
129+%s
130+
131+The Psiphon Team",
132+ 'fr' => "Welcome to Psiphon!
133+
134+Note: This invitation expires in %d days.
135+
136+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
137+
138+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
139+
140+Click this link to create your new Psiphon account:
141+
142+%s
143+
144+The Psiphon Team",
145+ 'es' => "Welcome to Psiphon!
146+
147+Note: This invitation expires in %d days.
148+
149+Do not share the following link or your Psiphon account login details on any public forum. This will help protect Psiphon from being blocked in your region.
150+
151+You may encounter an \"invalid security certificate\" warning when you activate or access your Psiphon account. Please select \"continue\" or \"add an exception\" to enable your browser to establish a secure connection to Psiphon.
152+
153+Click this link to create your new Psiphon account:
154+
155+%s
156+
157+The Psiphon Team",
158+>>>>>>> MERGE-SOURCE
159 ),
160
161 'invitation_subject' => array(
162@@ -5022,6 +5153,19 @@
163 Пожалуйста, используйте его для входа в Psiphon.",
164 ),
165
166+ 'invitations_expiration' => array(
167+ 'en' => "These invites expire in %d days",
168+ 'fa' => "These invites expire in %d days",
169+ 'ru' => "These invites expire in %d days",
170+ 'uz' => "These invites expire in %d days",
171+ 'tk' => "These invites expire in %d days",
172+ 'cn' => "These invites expire in %d days",
173+ 'ar' => "These invites expire in %d days",
174+ 'vt' => "These invites expire in %d days",
175+ 'fr' => "These invites expire in %d days",
176+ 'es' => "These invites expire in %d days",
177+ ),
178+
179 // DO NOT MODIFY THIS LINE -- END OF TRANSLATIONS
180 );
181
182
183=== modified file 'trunk/www/invite-m.php'
184--- trunk/www/invite-m.php 2010-07-14 18:35:25 +0000
185+++ trunk/www/invite-m.php 2010-10-21 05:41:11 +0000
186@@ -132,7 +132,8 @@
187
188 $invite_code = strtoupper(substr(bin2hex(secure_rand(ceil($random_hex_needed/2.0))), 0, $random_hex_needed));
189 $url = make_invite_url($config, (int)$_POST['proxy'], $invite_code);
190- $body = sprintf(msg("invitation_body"), $url);
191+ $invitation_expiration_time = $config["invitation_ttl"]/$config["seconds_in_day"];
192+ $body = sprintf(msg("invitation_body"), $invitation_expiration_time, $url);
193 $subject = msg("invitation_subject");
194 $proxy = $_POST['proxy'];
195
196@@ -197,8 +198,11 @@
197
198 // And we need to update $max_invite_count.
199 $max_invite_count = ($record_user['invite_token_count'] == Null ? $absolute_max_invite_count : min($record_user['invite_token_count'], $absolute_max_invite_count));
200-
201- $processing_results[] = sprintf(msg("invitations_queued"), $count);
202+
203+ $invitation_expiration_time = $config["invitation_ttl"]/$config["seconds_in_day"];
204+
205+ $processing_results[] = sprintf( msg("invitations_queued"), $count );
206+ $processing_results[] = sprintf( msg("invitations_expiration"), $invitation_expiration_time );
207
208 $invite_success = 1;
209 }
210@@ -225,7 +229,6 @@
211 <input name="csrf_token" value="<?=$record_user['csrf_token']?>" type="hidden"/>
212
213 <table cellpadding="2" cellspacing="0" border="0">
214-
215 <tr>
216 <th align="right"><?=msg("invite_tokens")?></th>
217 <td><?=($record_user['invite_token_count'] == Null ? msg("unlimited") : escape_html($record_user['invite_token_count']))?></td>
218
219=== modified file 'trunk/www/invite.php'
220--- trunk/www/invite.php 2010-07-16 19:31:33 +0000
221+++ trunk/www/invite.php 2010-10-21 05:41:11 +0000
222@@ -144,7 +144,11 @@
223 // And we need to update $max_invite_count.
224 $max_invite_count = ($record_user['invite_token_count'] == Null ? $absolute_max_invite_count : min($record_user['invite_token_count'], $absolute_max_invite_count));
225
226+ $invitation_expiration_time = $config["invitation_ttl"]/$config["seconds_in_day"];
227+
228 $processing_results[] = sprintf(msg("invitations_created"), $invites_created);
229+ $processing_results[] = sprintf( msg("invitations_expiration"), $invitation_expiration_time );
230+
231
232 $invite_success = 1;
233

Subscribers

People subscribed via source and target branches