| File TODO changed (mode: 100644) (index 8d06659..579e2d2) |
| 1 |
1 |
== Where I stopped last time == |
== Where I stopped last time == |
| 2 |
2 |
[ ] Add "Spread the word!" on website. |
[ ] Add "Spread the word!" on website. |
| 3 |
3 |
|
|
| 4 |
|
[ ] I am able to disable merge/pull requests? Anon yes, but the other ones? |
|
| 5 |
4 |
[ ] Check 'description_nice' and apply this everywhere. Maybe we should unset |
[ ] Check 'description_nice' and apply this everywhere. Maybe we should unset |
| 6 |
5 |
'description', so people will not be tempted to use it. |
'description', so people will not be tempted to use it. |
| 7 |
6 |
Maybe just overwrite 'description'. |
Maybe just overwrite 'description'. |
| |
| 12 |
11 |
Nu e OK. Trebuie doar pentru anumite cazuri: la o descriere pe pagina |
Nu e OK. Trebuie doar pentru anumite cazuri: la o descriere pe pagina |
| 13 |
12 |
proiectului, e nevoie. Dar intr-un form, in textarea, nu e nevoie. |
proiectului, e nevoie. Dar intr-un form, in textarea, nu e nevoie. |
| 14 |
13 |
Apoi as putea elimina description_nice. |
Apoi as putea elimina description_nice. |
| 15 |
|
[ ] Security: Link-uri + xss (Ionut) |
|
| 16 |
14 |
[ ] Upload kvm image to downloads.rocketgit.com. Sign it? sha256 it? |
[ ] Upload kvm image to downloads.rocketgit.com. Sign it? sha256 it? |
| 17 |
15 |
[ ] Security: validate sparas! |
[ ] Security: validate sparas! |
| 18 |
16 |
[ ] Menus - change color for selected items, not the background color. |
[ ] Menus - change color for selected items, not the background color. |
| |
| 20 |
18 |
creat din cauza event-ului care nu poate sa se conecteze la cache: |
creat din cauza event-ului care nu poate sa se conecteze la cache: |
| 21 |
19 |
broken pipe. Foarte ciudat. De ce nu ar putea trimite? |
broken pipe. Foarte ciudat. De ce nu ar putea trimite? |
| 22 |
20 |
Probabil socket-ul nu mai e deschis pentru ca cache-ul s-a restartat? |
Probabil socket-ul nu mai e deschis pentru ca cache-ul s-a restartat? |
| 23 |
|
[ ] Seems that 'token_key' is not created at boot time! Bad! |
|
| 24 |
21 |
[ ] I can do a select before write to be sure socket is open. |
[ ] I can do a select before write to be sure socket is open. |
| 25 |
22 |
If I get a error signal from select, reopen the socket. |
If I get a error signal from select, reopen the socket. |
| 26 |
23 |
[ ] SPF? mail-ul ajunge in spam! |
[ ] SPF? mail-ul ajunge in spam! |
| |
| 28 |
25 |
[ ] |
[ ] |
| 29 |
26 |
|
|
| 30 |
27 |
== BEFORE NEXT RELEASE == |
== BEFORE NEXT RELEASE == |
|
28 |
|
[ ] Security: Link-uri + xss (Ionut) |
|
29 |
|
[ ] I am able to disable merge/pull requests? Anon yes, but the other ones? |
|
30 |
|
[ ] report1: add disk space |
|
31 |
|
[ ] Compress logs (when we are short in disk space)? |
|
32 |
|
[ ] nofollow |
|
33 |
|
[ ] Check other filesystems: nils2 etc for virtual machine. |
| 31 |
34 |
[ ] Add right 'allow bad commit messages'. |
[ ] Add right 'allow bad commit messages'. |
| 32 |
35 |
[ ] Add a new section in 'Rights' to enforce a regex on the commit message. |
[ ] Add a new section in 'Rights' to enforce a regex on the commit message. |
| 33 |
36 |
[ ] Merge requests are not ok - still using files. |
[ ] Merge requests are not ok - still using files. |
| |
| 50 |
53 |
[ ] slogan: it is not rocket science |
[ ] slogan: it is not rocket science |
| 51 |
54 |
[ ] Only one daemon should update the structure, else they will conflict. |
[ ] Only one daemon should update the structure, else they will conflict. |
| 52 |
55 |
Dpne. Check. |
Dpne. Check. |
| 53 |
|
[ ] nofollow la logout; poate si in alte pati |
|
|
56 |
|
[ ] nofollow la logout; poate si in alte parti |
| 54 |
57 |
[ ] Check if SSL cyphers are ok |
[ ] Check if SSL cyphers are ok |
| 55 |
58 |
[ ] Se pare ca autogenerez drepturi 'All' pentru orice user asupra repo-ului. |
[ ] Se pare ca autogenerez drepturi 'All' pentru orice user asupra repo-ului. |
| 56 |
59 |
Se pare ca si la "Path rights"! |
Se pare ca si la "Path rights"! |
| File inc/admin.inc.php changed (mode: 100644) (index e533cc1..1127ab1) |
| ... |
... |
function rg_init($db, $rg) |
| 230 |
230 |
return $ret; |
return $ret; |
| 231 |
231 |
} |
} |
| 232 |
232 |
|
|
|
233 |
|
/* |
|
234 |
|
* Helper for rg_admin_report1 - suggestion report |
|
235 |
|
*/ |
|
236 |
|
function rg_admin_report1_suggestions($db, $from, $to) |
|
237 |
|
{ |
|
238 |
|
$ret = array(); |
|
239 |
|
$ret['yesterday'] = ""; |
|
240 |
|
|
|
241 |
|
// Total |
|
242 |
|
$sql = "SELECT COUNT(*) AS total FROM suggestions"; |
|
243 |
|
$res = rg_sql_query($db, $sql); |
|
244 |
|
if ($res === FALSE) { |
|
245 |
|
$ret['total'] = "ERR"; |
|
246 |
|
} else { |
|
247 |
|
$row = rg_sql_fetch_array($res); |
|
248 |
|
$ret['total'] = $row['total']; |
|
249 |
|
} |
|
250 |
|
rg_sql_free_result($res); |
|
251 |
|
|
|
252 |
|
// Yesterday - not yet because we do not have itime |
|
253 |
|
/* |
|
254 |
|
$sql = "SELECT uid, suggestion FROM suggestions" |
|
255 |
|
. " WHERE itime >= $y_start" |
|
256 |
|
. " AND itime <= $y_end"; |
|
257 |
|
$res = rg_sql_query($db, $sql); |
|
258 |
|
if ($res === FALSE) { |
|
259 |
|
$ret['yesterday'] = "ERR"; |
|
260 |
|
} else { |
|
261 |
|
$count = 0; |
|
262 |
|
$list = ''; |
|
263 |
|
while (($row = rg_sql_fetch_array($res))) { |
|
264 |
|
$count++; |
|
265 |
|
$list .= sprintf("%8u %s\n", |
|
266 |
|
$row['uid'], $row['suggestion']); |
|
267 |
|
} |
|
268 |
|
if ($count) |
|
269 |
|
$ret['yesterday'] = "\nYesterday suggestions" |
|
270 |
|
. " (" . $count . "):\n" . $list; |
|
271 |
|
} |
|
272 |
|
rg_sql_free_result($res); |
|
273 |
|
*/ |
|
274 |
|
|
|
275 |
|
return $ret; |
|
276 |
|
} |
|
277 |
|
|
| 233 |
278 |
/* |
/* |
| 234 |
279 |
* Send some daily statistics to the admin |
* Send some daily statistics to the admin |
| 235 |
280 |
*/ |
*/ |
| |
| ... |
... |
function rg_admin_report1($db, $rg) |
| 306 |
351 |
} |
} |
| 307 |
352 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
| 308 |
353 |
|
|
|
354 |
|
$sug = rg_admin_report1_suggestions($db, $y_start, $y_end); |
|
355 |
|
$body .= "\n\nTotal suggestions: " . $sug['total'] . "\n"; |
|
356 |
|
$body .= $sug['yesterday'] . "\n"; |
|
357 |
|
|
| 309 |
358 |
$rg['ui::email'] = $rg_admin_email; |
$rg['ui::email'] = $rg_admin_email; |
| 310 |
359 |
$rg['mail::subject'] = 'RocketGit daily report' |
$rg['mail::subject'] = 'RocketGit daily report' |
| 311 |
360 |
. ' [' . $users . '/' . $total_users . ']' |
. ' [' . $users . '/' . $total_users . ']' |
| File inc/fixes.inc.php changed (mode: 100644) (index 5a57ec0..2e002de) |
| ... |
... |
function rg_fixes_run($db, $old_ver) |
| 325 |
325 |
|
|
| 326 |
326 |
/* |
/* |
| 327 |
327 |
* Tests if fixes are needed. |
* Tests if fixes are needed. |
| 328 |
|
* Returns old version or FALSE if fixes are not needed. |
|
|
328 |
|
* Returns FALSE on error, 0 if not needed, 1 if needed. |
| 329 |
329 |
*/ |
*/ |
| 330 |
330 |
function rg_fixes_needed($db) |
function rg_fixes_needed($db) |
| 331 |
331 |
{ |
{ |
| |
| ... |
... |
function rg_fixes_needed($db) |
| 336 |
336 |
$ret = FALSE; |
$ret = FALSE; |
| 337 |
337 |
while (1) { |
while (1) { |
| 338 |
338 |
$old = rg_state_get($db, "fixes_version"); |
$old = rg_state_get($db, "fixes_version"); |
| 339 |
|
if ($old === FALSE) { |
|
| 340 |
|
//TODO: error rg_log("\tDEBUG: schema is up to date!"); |
|
|
339 |
|
if ($old === FALSE) |
| 341 |
340 |
break; |
break; |
| 342 |
|
} |
|
| 343 |
341 |
|
|
| 344 |
|
if (empty($old)) |
|
|
342 |
|
if ($old === "") |
| 345 |
343 |
$old = 0; |
$old = 0; |
| 346 |
344 |
|
|
| 347 |
345 |
//rg_log("DEBUG: old=$old new=$rg_fixes_ver"); |
//rg_log("DEBUG: old=$old new=$rg_fixes_ver"); |
| 348 |
346 |
if ($old == $rg_fixes_ver) { |
if ($old == $rg_fixes_ver) { |
| 349 |
|
//rg_log("DEBUG: fixes are up to date!"); |
|
|
347 |
|
// fixes are up to date |
|
348 |
|
$ret = 0; |
| 350 |
349 |
break; |
break; |
| 351 |
350 |
} |
} |
| 352 |
351 |
|
|
| 353 |
|
$ret = TRUE; |
|
|
352 |
|
$ret = 1; |
| 354 |
353 |
break; |
break; |
| 355 |
354 |
} |
} |
| 356 |
355 |
|
|
| |
| ... |
... |
function rg_fixes_needed($db) |
| 361 |
360 |
/* |
/* |
| 362 |
361 |
* Apply fixes if needed |
* Apply fixes if needed |
| 363 |
362 |
* Returns FALSE in case of error |
* Returns FALSE in case of error |
| 364 |
|
* This must not be run by web user because of the owner of the locking file. |
|
| 365 |
363 |
*/ |
*/ |
| 366 |
364 |
function rg_fixes_update($db) |
function rg_fixes_update($db) |
| 367 |
365 |
{ |
{ |
| |
| ... |
... |
function rg_fixes_update($db) |
| 371 |
369 |
|
|
| 372 |
370 |
$ret = FALSE; |
$ret = FALSE; |
| 373 |
371 |
while (1) { |
while (1) { |
| 374 |
|
$old = rg_fixes_needed($db); |
|
| 375 |
|
if ($old === FALSE) { |
|
|
372 |
|
$old = rg_state_get($db, "fixes_version"); |
|
373 |
|
if ($old === FALSE) |
|
374 |
|
break; |
|
375 |
|
|
|
376 |
|
if ($old === "") |
|
377 |
|
$old = 0; |
|
378 |
|
|
|
379 |
|
if ($old == $rg_fixes_ver) { |
| 376 |
380 |
$ret = TRUE; |
$ret = TRUE; |
| 377 |
381 |
break; |
break; |
| 378 |
382 |
} |
} |
| File inc/struct.inc.php changed (mode: 100644) (index 8a5ab38..6d5654f) |
| ... |
... |
$rg_sql_struct[32]['other'] = array( |
| 414 |
414 |
"repo_license" => "ALTER TABLE repos ADD license TEXT NOT NULL DEFAULT ''" |
"repo_license" => "ALTER TABLE repos ADD license TEXT NOT NULL DEFAULT ''" |
| 415 |
415 |
); |
); |
| 416 |
416 |
|
|
|
417 |
|
/* TODO |
|
418 |
|
$rg_sql_struct[33] = array(); |
|
419 |
|
$rg_sql_struct[33]['tables'] = array(); |
|
420 |
|
$rg_sql_struct[33]['other'] = array( |
|
421 |
|
"suggestion_itime" => "ALTER TABLE suggestions ADD itime INTEGER NOT NULL DEFAULT 0" |
|
422 |
|
); |
|
423 |
|
|
|
424 |
|
TODO: do not fill email in suggestions - we have the uid! |
|
425 |
|
TODO: "suggestion_drop_email" => "ALTER TABLE suggestions DROP email" |
|
426 |
|
*/ |
| 417 |
427 |
|
|
| 418 |
428 |
// This must be the last line |
// This must be the last line |
| 419 |
429 |
$rg_sql_schema_ver = count($rg_sql_struct); |
$rg_sql_schema_ver = count($rg_sql_struct); |
| |
| ... |
... |
function rg_sql_struct_slaves_update($db) |
| 617 |
627 |
|
|
| 618 |
628 |
$last_ts = rg_state_get($db, "slaves_create_last_ts"); |
$last_ts = rg_state_get($db, "slaves_create_last_ts"); |
| 619 |
629 |
if ($last_ts === FALSE) |
if ($last_ts === FALSE) |
| 620 |
|
$last_ts = 0; |
|
|
630 |
|
break; |
| 621 |
631 |
|
|
| 622 |
632 |
$last_ts = sprintf("%u", $last_ts); |
$last_ts = sprintf("%u", $last_ts); |
| 623 |
633 |
if ($last_ts == 0) |
if ($last_ts == 0) |
| File root/index.php changed (mode: 100644) (index 65bccd1..b6fd42d) |
| ... |
... |
$good = 0; |
| 82 |
82 |
$tries = 10; |
$tries = 10; |
| 83 |
83 |
while ($tries > 0) { |
while ($tries > 0) { |
| 84 |
84 |
$r = rg_sql_struct_update_needed($db); |
$r = rg_sql_struct_update_needed($db); |
| 85 |
|
if ($r === FALSE) { |
|
| 86 |
|
rg_log("sql_struct_update_needed returned FALSE! Exit."); |
|
| 87 |
|
break; |
|
| 88 |
|
} |
|
| 89 |
|
|
|
| 90 |
85 |
if ($r === 0) { |
if ($r === 0) { |
| 91 |
86 |
$r = rg_fixes_needed($db); |
$r = rg_fixes_needed($db); |
| 92 |
|
if ($r === FALSE) { |
|
|
87 |
|
if ($r === 0) { |
| 93 |
88 |
$good = 1; |
$good = 1; |
| 94 |
89 |
break; |
break; |
| 95 |
90 |
} |
} |
| |
| ... |
... |
if ($r === FALSE) { |
| 126 |
121 |
$body .= rg_template('admin/db_error.html'); |
$body .= rg_template('admin/db_error.html'); |
| 127 |
122 |
} else if ($r === '') { |
} else if ($r === '') { |
| 128 |
123 |
$body .= rg_init($db, $rg); |
$body .= rg_init($db, $rg); |
| 129 |
|
} else if ($r > 0) { |
|
|
124 |
|
} else { |
| 130 |
125 |
$rg['first_install_text'] = gmdate("Y-m-d", $r); |
$rg['first_install_text'] = gmdate("Y-m-d", $r); |
| 131 |
126 |
|
|
| 132 |
127 |
rg_log("Dispatching to [$_op]"); |
rg_log("Dispatching to [$_op]"); |
| File scripts/cron.php changed (mode: 100644) (index b456fb2..c4ba0d2) |
| ... |
... |
if ($r !== TRUE) |
| 62 |
62 |
exit(1); |
exit(1); |
| 63 |
63 |
|
|
| 64 |
64 |
$install_id = rg_state_get($db, "install_id"); |
$install_id = rg_state_get($db, "install_id"); |
|
65 |
|
if ($install_id === FALSE) |
|
66 |
|
exit(1); |
| 65 |
67 |
if (empty($install_id)) |
if (empty($install_id)) |
| 66 |
68 |
rg_state_set($db, "install_id", sha512(microtime(TRUE))); |
rg_state_set($db, "install_id", sha512(microtime(TRUE))); |
| 67 |
69 |
|
|
| 68 |
70 |
$first_install = rg_state_get($db, 'first_install'); |
$first_install = rg_state_get($db, 'first_install'); |
| 69 |
|
if ($first_install === '') |
|
|
71 |
|
if ($first_install === FALSE) |
|
72 |
|
exit(1); |
|
73 |
|
if (empty($first_install)) { |
|
74 |
|
rg_log("Admin did not created the user, so no need to run this code."); |
| 70 |
75 |
exit(0); |
exit(0); |
|
76 |
|
} |
| 71 |
77 |
|
|
| 72 |
78 |
if (gmdate("Hi") == "0105") { |
if (gmdate("Hi") == "0105") { |
| 73 |
79 |
while (1) { |
while (1) { |