File TODO changed (mode: 100644) (index 5013ef2..6d8ef97) |
2 |
2 |
[ ] |
[ ] |
3 |
3 |
|
|
4 |
4 |
== BEFORE NEXT RELEASE == |
== BEFORE NEXT RELEASE == |
|
5 |
|
[ ] "Do not verify the certificate" - not clear which cert! |
|
6 |
|
[ ] wh: at push time the triggers are not called! |
|
7 |
|
[ ] Auto subscribe users to blog, but allow them to unsubscribe from e-mail. |
|
8 |
|
[ ] Do a small tutorial on how you can create themes (Gabi). |
|
9 |
|
[ ] rate another repo (Gabi) |
|
10 |
|
[ ] suggestions: at least notify by e-mail. |
|
11 |
|
[ ] For pull request by anon push, add a button to send an e-mail with an |
|
12 |
|
authorization code to be able to destroy/edit pr. |
|
13 |
|
The e-mail can be taken from commits. |
|
14 |
|
Maybe we should reject pr with wrong e-mail addresses? |
|
15 |
|
[ ] For public repos, we should activate by default anonymous push |
|
16 |
|
and teach user how to disable it. |
|
17 |
|
[ ] When a php script exists, check that every db res was freed! |
|
18 |
|
I found one case in keys.inc.php! |
|
19 |
|
[ ] Mark in cache that we updated first use to not update it too often. |
|
20 |
|
[ ] Keep in history also the fetches? |
|
21 |
|
[ ] When showing files, show total number of lines, size in bytes, type, |
|
22 |
|
button for download, history, blame, printable, history. |
|
23 |
|
[ ] Suggest 4096 bits RSA keys instead of 2048. |
|
24 |
|
[ ] https://rocketgit.com/user/user/repo/source/log |
|
25 |
|
We may want to transform the author into a link to rocketgit user page. |
|
26 |
|
[ ] Binary files show wrong on "Tree" menu. |
|
27 |
|
Example: https://rocketgit.com/user/catalinux/rocketgit/source/tree/blob/root/favicon.ico |
|
28 |
|
[ ] Landing page: As pune accesul spre rutina de inscriere mai sus, in |
|
29 |
|
loc de cinste, si explicatiile mai jos, pentru cei care nu stiu |
|
30 |
|
inca de site si de ce face el (Paul). |
|
31 |
|
[ ] Pricing: as face box-ul cu paid support cu o slightly alta culoare |
|
32 |
|
ca alea mai free, care ar fi bine sa fie mai vizibile. (Paul) |
|
33 |
|
[ ] Link to a resource to learn more about Git (Paul) |
|
34 |
|
https://git-scm.com/book/en/v2/Getting-Started-Git-Basics |
|
35 |
|
[ ] Si mai zi si ca apreciezi ajutorul dat pentru traducerea site-ului |
|
36 |
|
in alte limbi (Paul). |
|
37 |
|
[ ] Lightest: eu inteleg prin light ceva mai soft, asa, ai usurel si |
|
38 |
|
nu foarte profund; as folosi 'highly professional, yet |
|
39 |
|
super-lightweight' (Paul) |
|
40 |
|
[ ] AS LASA BARA CU MENIUL GLOBAL MEREU VIZIBILA, SUS (Paul) |
|
41 |
|
I hope it will work only with css, else I will not do it. |
|
42 |
|
[ ] Tonurile sunt foarte apropiate si e greu de urmarit si greu de citi, |
|
43 |
|
de-a dreptul (Paul). |
|
44 |
|
[ ] Redo favicon.ico with 3 layes, 16x16, 32x32, 48x48 (Paul). |
|
45 |
|
[ ] Add possibility to change the time reporting (selecting a timezone) (Paul) |
|
46 |
|
[ ] When repo changes, seems we do not send by email what changed. |
|
47 |
|
[ ] What is "Non fast-forwards" - document in hints. |
|
48 |
|
[ ] ip: comma/space: not ENTER? |
|
49 |
|
[ ] admin: button to pause events processing. and a reason? |
|
50 |
|
[ ] pr: Add 'reviewers' to a pull request. |
|
51 |
|
[ ] Set a timezone if not set to avoid stupid php warnings. |
|
52 |
|
[ ] Add a second part, documenting php-fpm. |
5 |
53 |
[ ] Paul: Notify all users (watchers and maybe the ones that had access) |
[ ] Paul: Notify all users (watchers and maybe the ones that had access) |
6 |
54 |
that a repo was deleted. |
that a repo was deleted. |
7 |
55 |
[ ] Paul: Add (per project) an "invite" form. The user receiving the e-mail |
[ ] Paul: Add (per project) an "invite" form. The user receiving the e-mail |
|
12 |
60 |
[ ] Add phone number for security reasons (if user lost 2fa device etc.) |
[ ] Add phone number for security reasons (if user lost 2fa device etc.) |
13 |
61 |
[ ] Clicking "Discovery" and no repo is present should not invite the user |
[ ] Clicking "Discovery" and no repo is present should not invite the user |
14 |
62 |
to create one... |
to create one... |
15 |
|
[ ] css: #profiling still used? |
|
16 |
63 |
[ ] Obsolete 'suggestions' and replace them with a link to the bug tracker. |
[ ] Obsolete 'suggestions' and replace them with a link to the bug tracker. |
17 |
64 |
[ ] wh: operation ('event') is not present in the post request! |
[ ] wh: operation ('event') is not present in the post request! |
18 |
65 |
[ ] Alert admin on any problems (for example if authorized_keys is not |
[ ] Alert admin on any problems (for example if authorized_keys is not |
|
21 |
68 |
and, because of ssl caching, will be able to post the notification |
and, because of ssl caching, will be able to post the notification |
22 |
69 |
to the victim's server. In C I will be able to use |
to the victim's server. In C I will be able to use |
23 |
70 |
CURLOPT_SSL_SESSIONID_CACHE = 0. |
CURLOPT_SSL_SESSIONID_CACHE = 0. |
24 |
|
[ ] Add a signing key for webhooks to compute a HMAC. |
|
25 |
71 |
[ ] events: add more "threads", so one webhook (for example) |
[ ] events: add more "threads", so one webhook (for example) |
26 |
|
will not block all request. Use a pool with a configurable |
|
|
72 |
|
will not block all requests. Use a pool with a configurable |
27 |
73 |
number of workers. |
number of workers. |
28 |
|
[ ] tests: if rg_debug == 1 and a test fails, do not retry it! |
|
29 |
|
Maybe also delete it from 'events' table? |
|
30 |
74 |
[ ] pr: Allow to add a pr even if the repo is not hosted on rocketgit. |
[ ] pr: Allow to add a pr even if the repo is not hosted on rocketgit. |
31 |
75 |
For example, somebody can create a pull request specifying |
For example, somebody can create a pull request specifying |
32 |
76 |
an external url and src/dst branch! |
an external url and src/dst branch! |
|
44 |
88 |
Seems I need to replace rg_mr_queue_add with rg_mr_create. |
Seems I need to replace rg_mr_queue_add with rg_mr_create. |
45 |
89 |
Cron loads merge requests from files and calls mr_queue_add. |
Cron loads merge requests from files and calls mr_queue_add. |
46 |
90 |
[ ] Add avatars for notes and bugs. |
[ ] Add avatars for notes and bugs. |
47 |
|
[ ] Allow an admin to run extra hooks by adding them info |
|
48 |
|
/var/lib/rocketgit/extra_hooks/{update,post-receive,...}/ |
|
|
91 |
|
[ ] Allow an admin to run extra hooks by adding _them_ info |
|
92 |
|
/var/lib/rocketgit/extra_hooks/{update,post-receive,...}/ folder. |
49 |
93 |
[ ] check 'man git-receive-pack' for gpg (about signed pushes). |
[ ] check 'man git-receive-pack' for gpg (about signed pushes). |
50 |
|
[ ] I still have to investigate if I can send git messages. |
|
|
94 |
|
[ ] I still have to investigate if I can send git meta messages. |
51 |
95 |
Not in hooks, but at start. I want to send the welcome message. |
Not in hooks, but at start. I want to send the welcome message. |
52 |
96 |
[ ] After pushing using anon-push feature, give to the user a link to be able |
[ ] After pushing using anon-push feature, give to the user a link to be able |
53 |
97 |
to add a proper subject/body. Else, use the first commit for this. |
to add a proper subject/body. Else, use the first commit for this. |
|
103 |
147 |
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" |
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" |
104 |
148 |
[ ] Need to add comments for pull requests. Find a way to propagate them in the |
[ ] Need to add comments for pull requests. Find a way to propagate them in the |
105 |
149 |
git repo? |
git repo? |
106 |
|
[ ] Because I show the merge request id, somebody can change the commits. |
|
|
150 |
|
[ ] Because I show the pull request id, somebody can change the commits. |
107 |
151 |
Somehow, it should be locked? |
Somehow, it should be locked? |
108 |
152 |
[ ] Add "Pull request" and allow a user to do it from a branch or a fork. |
[ ] Add "Pull request" and allow a user to do it from a branch or a fork. |
109 |
153 |
[ ] When a push is taking place, add the repo into a new table to: |
[ ] When a push is taking place, add the repo into a new table to: |
110 |
154 |
- recalculate disk space |
- recalculate disk space |
111 |
155 |
- redo the stats |
- redo the stats |
112 |
|
[ ] Look into Travis |
|
|
156 |
|
[ ] Look into making a open source project like travis-ci.org. |
|
157 |
|
Seems is GitHub locked (you need an GitHub account)! |
113 |
158 |
[ ] Add a prefetched daemon. Example: When user logins, prefetch repo info |
[ ] Add a prefetched daemon. Example: When user logins, prefetch repo info |
114 |
159 |
to be warm in cache. The user for sure will access the repos. |
to be warm in cache. The user for sure will access the repos. |
115 |
160 |
Maybe set a permanent cookie to encode the uid and when a user visits |
Maybe set a permanent cookie to encode the uid and when a user visits |
|
129 |
174 |
may want to know. I think I will drop this for now. |
may want to know. I think I will drop this for now. |
130 |
175 |
[ ] Send an e-mail if webhook fails? Flag when configuring webhook? |
[ ] Send an e-mail if webhook fails? Flag when configuring webhook? |
131 |
176 |
Store the last curl log in 'wh' table? |
Store the last curl log in 'wh' table? |
132 |
|
[ ] unit test: generate a CA, client cert, server cert, and use openssl |
|
133 |
|
s_server to test? Or maybe curl in mode server? Or php in listen |
|
134 |
|
mode? |
|
135 |
177 |
[ ] Clean 'tmp' folder. |
[ ] Clean 'tmp' folder. |
136 |
178 |
[ ] Document webhooks, mostly 'PHP serialize' type. But also other things. |
[ ] Document webhooks, mostly 'PHP serialize' type. But also other things. |
137 |
179 |
[ ] Do not forget that cache.php has its own memory cache! |
[ ] Do not forget that cache.php has its own memory cache! |
|
148 |
190 |
[ ] When I am in "My repositories" and I am doing a search, other users' |
[ ] When I am in "My repositories" and I am doing a search, other users' |
149 |
191 |
repositories are shown. |
repositories are shown. |
150 |
192 |
[ ] In user/home-page.php, in hints section, add a message when the user is |
[ ] In user/home-page.php, in hints section, add a message when the user is |
151 |
|
low on scratch codes. Not hint. |
|
|
193 |
|
low on scratch codes. Not hint. Or, notify by e-mail? |
152 |
194 |
[ ] test with "short" (0 prepended) codes in unit testing. |
[ ] test with "short" (0 prepended) codes in unit testing. |
153 |
195 |
For scs, done, test for devices? This is a little bit harder. |
For scs, done, test for devices? This is a little bit harder. |
154 |
196 |
[ ] totp:ssh: do we need a command to remove a set of scratch codes? |
[ ] totp:ssh: do we need a command to remove a set of scratch codes? |
155 |
197 |
Something like 'remove-sc [<itime>]'. If <itime> is missing, list the |
Something like 'remove-sc [<itime>]'. If <itime> is missing, list the |
156 |
198 |
sets. The IP must be authorized? |
sets. The IP must be authorized? |
157 |
|
[ ] In report, just show the newly added repos, not the totals. Totals in body. |
|
158 |
199 |
[ ] Apply to become a member of Software Freedom Conservancy? |
[ ] Apply to become a member of Software Freedom Conservancy? |
159 |
|
[ ] Why do we have an index by 'users.username'?! Seems wrong! |
|
160 |
200 |
[ ] totp: add sc for ssh! |
[ ] totp: add sc for ssh! |
161 |
201 |
Should I validate one after asking the user to store them safe? |
Should I validate one after asking the user to store them safe? |
162 |
202 |
Think about power down before scratch codes hit the printer. |
Think about power down before scratch codes hit the printer. |
File inc/webhooks.inc.php changed (mode: 100644) (index 29610f0..4dee10c) |
... |
... |
function rg_wh_send_one($db, $event) |
130 |
130 |
break; |
break; |
131 |
131 |
} |
} |
132 |
132 |
|
|
|
133 |
|
$xerr = &$r; |
133 |
134 |
rg_log_ml('Answer: ' . print_r($r, TRUE)); |
rg_log_ml('Answer: ' . print_r($r, TRUE)); |
134 |
135 |
|
|
135 |
136 |
if ($event['debug'] == 1) |
if ($event['debug'] == 1) |
|
... |
... |
function rg_wh_send_one($db, $event) |
149 |
150 |
if ($ca_file !== FALSE) |
if ($ca_file !== FALSE) |
150 |
151 |
@unlink($ca_file); |
@unlink($ca_file); |
151 |
152 |
|
|
|
153 |
|
rg_wh_set_last_output($db, $event['ui']['uid'], $wh['id'], |
|
154 |
|
substr($xerr, 0, 4096)); |
|
155 |
|
|
152 |
156 |
rg_prof_end('wh_send_helper'); |
rg_prof_end('wh_send_helper'); |
153 |
157 |
return $ret; |
return $ret; |
154 |
158 |
} |
} |
|
... |
... |
function rg_wh_send($db, $event) |
170 |
174 |
// Filter them by repo_id |
// Filter them by repo_id |
171 |
175 |
$real_list = array(); |
$real_list = array(); |
172 |
176 |
foreach ($r['list'] as $id => $info) { |
foreach ($r['list'] as $id => $info) { |
173 |
|
if (($info['repo_id'] != 0) |
|
|
177 |
|
if (($info['repo_id'] > 0) |
174 |
178 |
&& ($event['ri']['repo_id'] != $info['repo_id'])) { |
&& ($event['ri']['repo_id'] != $info['repo_id'])) { |
175 |
179 |
rg_log('hook is not for this repo'); |
rg_log('hook is not for this repo'); |
176 |
180 |
continue; |
continue; |
|
... |
... |
function rg_wh_events($events) |
313 |
317 |
} |
} |
314 |
318 |
|
|
315 |
319 |
$rg_wh_flags = array( |
$rg_wh_flags = array( |
316 |
|
'I' => 'Do not verify the certificate', |
|
317 |
|
'H' => 'Do not verify the hostname' |
|
|
320 |
|
'I' => 'Do not verify the server certificate', |
|
321 |
|
'H' => 'Do not verify the server hostname' |
318 |
322 |
); |
); |
319 |
323 |
/* |
/* |
320 |
324 |
* Generates flags list |
* Generates flags list |
|
... |
... |
function rg_wh_cosmetic(&$list) |
391 |
395 |
$row['HTML:client_ca_cert_short'] = |
$row['HTML:client_ca_cert_short'] = |
392 |
396 |
empty($row['client_ca_cert']) ? |
empty($row['client_ca_cert']) ? |
393 |
397 |
'' : nl2br(rg_xss_safe(substr($row['client_ca_cert'], 0, 32))) . '...'; |
'' : nl2br(rg_xss_safe(substr($row['client_ca_cert'], 0, 32))) . '...'; |
|
398 |
|
|
|
399 |
|
if (isset($row['last_output'])) |
|
400 |
|
$row['HTML:last_output_nice'] = |
|
401 |
|
nl2br(rg_xss_safe($row['last_output'])); |
394 |
402 |
} |
} |
395 |
403 |
} |
} |
396 |
404 |
|
|
|
405 |
|
/* |
|
406 |
|
* Set last_output field of a webhook |
|
407 |
|
*/ |
|
408 |
|
function rg_wh_set_last_output($db, $uid, $id, $output) |
|
409 |
|
{ |
|
410 |
|
rg_prof_start('wh_set_last_output'); |
|
411 |
|
rg_log_enter('wh_set_last_output id=$id'); |
|
412 |
|
|
|
413 |
|
$ret = FALSE; |
|
414 |
|
while (1) { |
|
415 |
|
$params = array('id' => $id, 'last_output' => $output); |
|
416 |
|
$sql = 'UPDATE webhooks' |
|
417 |
|
. ' SET last_output = @@last_output@@' |
|
418 |
|
. ' WHERE id = @@id@@'; |
|
419 |
|
$res = rg_sql_query_params($db, $sql, $params); |
|
420 |
|
if ($res === FALSE) { |
|
421 |
|
rg_wh_set_error('cannot insert/update data'); |
|
422 |
|
break; |
|
423 |
|
} |
|
424 |
|
rg_sql_free_result($res); |
|
425 |
|
|
|
426 |
|
$key = 'user' . '::' . $uid . '::' . 'wh' . '::' . 'list' |
|
427 |
|
. '::' . $id . '::' . 'last_output'; |
|
428 |
|
rg_cache_set($key, $output, RG_SOCKET_NO_WAIT); |
|
429 |
|
|
|
430 |
|
$ret = TRUE; |
|
431 |
|
break; |
|
432 |
|
} |
|
433 |
|
|
|
434 |
|
rg_log_exit(); |
|
435 |
|
rg_prof_end('wh_set_last_output'); |
|
436 |
|
return $ret; |
|
437 |
|
} |
|
438 |
|
|
397 |
439 |
/* |
/* |
398 |
440 |
* Returns a list of webhooks associated with a user |
* Returns a list of webhooks associated with a user |
399 |
441 |
* @repo_id may be 0 => hooks installed on user account |
* @repo_id may be 0 => hooks installed on user account |
|
... |
... |
function rg_wh_list($db, $uid) |
407 |
449 |
while (1) { |
while (1) { |
408 |
450 |
$key = 'user' . '::' . $uid . '::' . 'wh'; |
$key = 'user' . '::' . $uid . '::' . 'wh'; |
409 |
451 |
$r = rg_cache_get($key); |
$r = rg_cache_get($key); |
410 |
|
if ($r !== FALSE) { |
|
411 |
|
$ret['list'] = $r; |
|
|
452 |
|
if (($r !== FALSE) && isset($r['LIST_LOADED'])) { |
|
453 |
|
$ret['list'] = $r['list']; |
412 |
454 |
$ret['ok'] = 1; |
$ret['ok'] = 1; |
413 |
455 |
break; |
break; |
414 |
456 |
} |
} |
|
... |
... |
function rg_wh_list($db, $uid) |
429 |
471 |
} |
} |
430 |
472 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
431 |
473 |
|
|
432 |
|
rg_cache_set($key, $ret['list'], RG_SOCKET_NO_WAIT); |
|
|
474 |
|
$a = array('LIST_LOADED' => 1, 'list' => $ret['list']); |
|
475 |
|
rg_cache_merge($key, $a, RG_SOCKET_NO_WAIT); |
433 |
476 |
$ret['ok'] = 1; |
$ret['ok'] = 1; |
434 |
477 |
break; |
break; |
435 |
478 |
} |
} |
|
... |
... |
function rg_wh_add($db, $uid, $data) |
487 |
530 |
|
|
488 |
531 |
if ($data['id'] == 0) |
if ($data['id'] == 0) |
489 |
532 |
$params['id'] = $row['id']; |
$params['id'] = $row['id']; |
490 |
|
$key = 'user' . '::' . $uid . '::' . 'wh' |
|
|
533 |
|
$key = 'user' . '::' . $uid . '::' . 'wh' . '::' . 'list' |
491 |
534 |
. '::' . $params['id']; |
. '::' . $params['id']; |
492 |
|
rg_cache_set($key, $params, RG_SOCKET_NO_WAIT); |
|
|
535 |
|
rg_cache_merge($key, $params, RG_SOCKET_NO_WAIT); |
493 |
536 |
|
|
494 |
537 |
$ret['ok'] = 1; |
$ret['ok'] = 1; |
495 |
538 |
break; |
break; |
|
... |
... |
function rg_wh_remove($db, $uid, $list) |
533 |
576 |
rg_sql_free_result($res); |
rg_sql_free_result($res); |
534 |
577 |
|
|
535 |
578 |
foreach ($my_list as $junk => $id) { |
foreach ($my_list as $junk => $id) { |
536 |
|
$key = 'user' . '::' . $uid . '::' . 'wh' . '::' . $id; |
|
|
579 |
|
$key = 'user' . '::' . $uid . '::' . 'wh' |
|
580 |
|
. '::' . 'list' . '::' . $id; |
537 |
581 |
rg_cache_unset($key, RG_SOCKET_NO_WAIT); |
rg_cache_unset($key, RG_SOCKET_NO_WAIT); |
538 |
582 |
} |
} |
539 |
583 |
|
|