Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Small changes all over the place; first version with docker | 657c8c4be46ae950d519320d1d54aa2f65a577d6 | Catalin(ux) M. BOIE | 2016-01-05 17:09:04 |
Cannot use env vars from cron | 9c3b7123869564217493ab43c4bafdea2ce15702 | Catalin(ux) M. BOIE | 2016-01-03 08:45:51 |
Bump version to 0.44 | bb334f3f3ec2af94da578b6c2e9202b339f80f36 | Catalin(ux) M. BOIE | 2016-01-02 23:25:39 |
Minor changes all over the place. | 66c13a18b41d19e41e48aac537b735963bbb1f5a | Catalin(ux) M. BOIE | 2016-01-02 23:03:15 |
Set a timezone if is not set globally | 0fb57c1d20aebfaaa6c1c48125b39aa8d7765923 | Catalin(ux) M. BOIE | 2016-01-02 21:09:41 |
If SELinux is not enabled, do not check the label | 6a4a54c986eae48b6dfb56c33b5ac4498935669e | Catalin(ux) M. BOIE | 2016-01-02 09:13:32 |
0.43 release | e0656f4559fa64d94a12bc650dd26fde02e0197c | Catalin(ux) M. BOIE | 2016-01-01 09:11:01 |
CSS fixes (more flex); removed 'between' template | 3425b4b9d8744d21f2b581a9f09f563cd0c84e01 | Catalin(ux) M. BOIE | 2015-12-31 16:07:01 |
Drop old and empty slave tables | 49acbf556027578733ed631c551b6cb3266d2af6 | Catalin(ux) M. BOIE | 2015-12-30 09:00:56 |
Fixes all over the code; made webhooks generic | 9c1328fa3c207d9bc109c2dd486999318a215d84 | Catalin(ux) M. BOIE | 2015-12-29 07:40:56 |
Fixed submodule link (reported by Gabi B) | 43e213676ffb27fabc4d0137337ac6e332185a33 | Catalin(ux) M. BOIE | 2015-12-20 08:07:14 |
Sort rights by prio for real | f2626cb2fcfedd9c567b1fa50ce9521981241693 | Catalin(ux) M. BOIE | 2015-12-18 05:49:52 |
When editing rights, do not filter by uid. Reported by Gabi | 1c50981db99bc9ba05cfa1a6e735eddc3af2a0e8 | Catalin(ux) M. BOIE | 2015-12-16 21:46:29 |
Rights and CSS fixes | c16729a6930e8168b4c3fdf897319987d33b5ba7 | Catalin(ux) M. BOIE | 2015-12-13 19:25:35 |
Corrected urls to bug and notes | 02032d2670f977cf4e40b2a1561527e0832a4ffa | Catalin(ux) M. BOIE | 2015-12-13 05:19:50 |
Random changes: TODO, CSS etc. | 514ca23b83da81827e03c7ff8866aa29d75f0f5e | Catalin(ux) M. BOIE | 2015-12-11 17:56:38 |
Amazon CodeDeploy first "battle" plan | d48b652f02ed413c089a462f493dbf7dbec27388 | Catalin(ux) M. BOIE | 2015-12-11 17:56:18 |
Explained more clear the block all rights rule | 865dd66672abfb1fb0996a970f563dcc7d9a43d0 | Catalin(ux) M. BOIE | 2015-12-11 17:52:49 |
Show on user's homepage since when is a member | f514219acda902ddb7ce34708ce6a107bed995b2 | Catalin(ux) M. BOIE | 2015-12-11 17:50:41 |
Fetch for public repo smust have prio 1 not 30001 | 4dc521603485fd804d4cdeed0819c432f1120e55 | Catalin(ux) M. BOIE | 2015-12-11 17:30:26 |
File TODO changed (mode: 100644) (index b5ca29e..6364e9c) | |||
2 | 2 | [ ] | [ ] |
3 | 3 | ||
4 | 4 | == BEFORE NEXT RELEASE == | == BEFORE NEXT RELEASE == |
5 | [ ] When rejecting a push because of rights, show also what rule matched. | ||
6 | Maybe why? For example: ip is not in range? | ||
7 | [ ] Discover: I must not say | ||
8 | "No repositories found. Go to My repositories / Create to add one." | ||
9 | It is about the others' repos. | ||
5 | 10 | [ ] Why we do not connect to local named socket for postgres?! | [ ] Why we do not connect to local named socket for postgres?! |
11 | Changed, let's see what breaks. | ||
6 | 12 | [ ] Comment out "DEBUG list:" line. | [ ] Comment out "DEBUG list:" line. |
7 | 13 | [ ] Somehow, test if we use rg_xss_safe if a 'HTML:' var is set. | [ ] Somehow, test if we use rg_xss_safe if a 'HTML:' var is set. |
8 | 14 | [ ] ssh: not documented in hints | [ ] ssh: not documented in hints |
13 | 19 | [ ] Do not show 'webhooks' menu if the login user has no rights. | [ ] Do not show 'webhooks' menu if the login user has no rights. |
14 | 20 | This is for when we will allow webhooks per repo. | This is for when we will allow webhooks per repo. |
15 | 21 | [ ] Add labels for users and for repos/comments/etc.? [Also] private ones? | [ ] Add labels for users and for repos/comments/etc.? [Also] private ones? |
16 | [ ] I should add "Labels: " in front of labels. | ||
17 | 22 | [ ] last events: gravatar | [ ] last events: gravatar |
18 | 23 | [ ] last events: 2015-12-27 09:42 n/a Reference refs/heads/master created (290e4f7a70640d79836b3298c47b913484da24de) | [ ] last events: 2015-12-27 09:42 n/a Reference refs/heads/master created (290e4f7a70640d79836b3298c47b913484da24de) |
19 | 24 | Why we do not have the user?! Ah, because is anonymous. | Why we do not have the user?! Ah, because is anonymous. |
File docker/Dockerfile changed (mode: 100644) (index 691e4fb..7ed5eec) | |||
1 | 1 | FROM fedora:23 | FROM fedora:23 |
2 | 2 | MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> | MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> |
3 | 3 | ||
4 | EXPOSE 80 | ||
5 | EXPOSE 443 | ||
6 | EXPOSE 22 | ||
7 | EXPOSE 9418 | ||
8 | |||
9 | 4 | RUN dnf -y upgrade --best --allowerasing | RUN dnf -y upgrade --best --allowerasing |
10 | 5 | RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.10-1.noarch.rpm | RUN dnf -y install http://kernel.embedromix.ro/dinorepo-0.0.10-1.noarch.rpm |
11 | RUN dnf -y install rocketgit | ||
12 | RUN dnf -y install psmisc procps-ng sendmail php-opcache | ||
13 | |||
6 | RUN dnf -y install rocketgit-0.44 | ||
7 | RUN dnf -y install psmisc procps-ng sendmail php-opcache qrencode | ||
14 | 8 | ||
15 | 9 | COPY rg.sh / | COPY rg.sh / |
16 | 10 | ||
... | ... | RUN sed -i -e 's|;opcache.enable_cli=.*|opcache.enable_cli=1|' /etc/php-zts.d/10 | |
19 | 13 | RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users | RUN grep -q ^rocketgit ${dir}/etc/mail/trusted-users || echo "rocketgit" >> /etc/mail/trusted-users |
20 | 14 | RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users | RUN grep -q ^apache ${dir}/etc/mail/trusted-users || echo "apache" >> /etc/mail/trusted-users |
21 | 15 | ||
22 | |||
23 | 16 | VOLUME /var/lib/rocketgit | VOLUME /var/lib/rocketgit |
24 | 17 | VOLUME /home/rocketgit | VOLUME /home/rocketgit |
25 | 18 | ||
19 | EXPOSE 80 | ||
20 | EXPOSE 443 | ||
21 | EXPOSE 22 | ||
22 | EXPOSE 9418 | ||
23 | |||
26 | 24 | CMD ["/rg.sh"] | CMD ["/rg.sh"] |
File docker/Dockerfile-postgresql changed (mode: 100644) (index efd7f43..fed6665) | |||
1 | 1 | FROM fedora:23 | FROM fedora:23 |
2 | 2 | MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> | MAINTAINER Catalin(ux) M. BOIE <catab-docker@embedromix.ro> |
3 | 3 | ||
4 | EXPOSE 5432 | ||
5 | |||
4 | RUN dnf -y upgrade --best --allowerasing | ||
6 | 5 | RUN dnf -y install postgresql-server | RUN dnf -y install postgresql-server |
7 | 6 | ||
8 | 7 | USER postgres | USER postgres |
... | ... | RUN initdb --data-checksums | |
13 | 12 | ||
14 | 13 | VOLUME /var/lib/postgresql/data | VOLUME /var/lib/postgresql/data |
15 | 14 | ||
15 | EXPOSE 5432 | ||
16 | |||
16 | 17 | COPY postgresql-start.sh / | COPY postgresql-start.sh / |
17 | 18 | ||
18 | 19 | CMD ["/postgresql-start.sh"] | CMD ["/postgresql-start.sh"] |
File docker/README changed (mode: 100644) (index edfef3a..488fa98) | |||
... | ... | docker rm rp | |
7 | 7 | ||
8 | 8 | docker exec -it rg bash | docker exec -it rg bash |
9 | 9 | ||
10 | to debug: | ||
11 | docker run -d -P --name rg --link rp \ | ||
12 | -v /BIG1T/sync1/Dev/rocketgit/inc:/usr/share/rocketgit/inc \ | ||
13 | -v /BIG1T/sync1/Dev/rocketgit/scripts:/usr/share/rocketgit/scripts \ | ||
14 | -v /BIG1T/sync1/Dev/rocketgit/hooks:/usr/share/rocketgit/hooks \ | ||
15 | -v /BIG1T/sync1/Dev/rocketgit/root:/usr/share/rocketgit/root \ | ||
16 | rocketgit | ||
17 | |||
18 | |||
10 | 19 | == doc == | == doc == |
11 | 20 | docker inspect | docker inspect |
12 | 21 | docker info | docker info |
... | ... | docker run -name aaa my_img echo "aaa" | |
20 | 29 | docker stop aaa | docker stop aaa |
21 | 30 | docker rm | docker rm |
22 | 31 | ||
32 | docker tag image_id docker_user_name/image_name:label_for_example_latest | ||
33 | docker login --username=rocketgit --email=docker@embedromix.ro | ||
34 | docker push rocketgit/rocketgit | ||
35 | |||
23 | 36 | Running an interactive shell: | Running an interactive shell: |
24 | 37 | docker run -i -t fedora /bin/bash | docker run -i -t fedora /bin/bash |
25 | 38 | docker run --interactive=true --tty=true fedora /bin/bash | docker run --interactive=true --tty=true fedora /bin/bash |
... | ... | docker kill aaa | |
33 | 46 | docker run -p 4444 | docker run -p 4444 |
34 | 47 | docker port $JOB | docker port $JOB |
35 | 48 | ||
49 | == compose == | ||
50 | docker-compose up | ||
51 | docker-compse ps | ||
52 | docker-compose run web env | ||
53 | docker-compose stop |
File docker/TODO changed (mode: 100644) (index cbefb16..26209f5) | |||
1 | [ ] Test if xinetd is started | ||
1 | 2 | [ ] Fix rocketgit link | [ ] Fix rocketgit link |
2 | 3 | [ ] Specify docker build http://... | [ ] Specify docker build http://... |
3 | 4 | [ ] | [ ] |
File docker/docker-compose.yml added (mode: 100644) (index 0000000..42cbebe) | |||
1 | web: | ||
2 | image: rocketgit | ||
3 | links: | ||
4 | - rp | ||
5 | rp: | ||
6 | image: rocketgit-postgresql |
File docker/rg.sh changed (mode: 100755) (index 915459d..3916451) | |||
2 | 2 | ||
3 | 3 | # This file will be included in docker 'rocketgit' Dockerfile | # This file will be included in docker 'rocketgit' Dockerfile |
4 | 4 | ||
5 | sed -i -e "s|\$rg_sql = .*$|\$rg_sql = 'host=${RP_PORT_5432_TCP_ADDR} port=${RP_PORT_5432_TCP_PORT} user=rocketgit dbname=rocketgit connect_timeout=10';|" /etc/rocketgit/config.php | ||
6 | |||
5 | 7 | while [ 1 ]; do | while [ 1 ]; do |
6 | 8 | if [ "`ps ax|grep -v grep|grep http`" = "" ]; then | if [ "`ps ax|grep -v grep|grep http`" = "" ]; then |
7 | 9 | echo "Running httpd..." | echo "Running httpd..." |
File duilder.conf changed (mode: 100644) (index 81b7574..825eace) | |||
1 | 1 | PRJ="rocketgit" | PRJ="rocketgit" |
2 | VER="0.44" | ||
2 | VER="0.45" | ||
3 | 3 | REV="1" | REV="1" |
4 | 4 | EXCLUDE=".exclude" | EXCLUDE=".exclude" |
5 | 5 | EXPORT_PATH="/data/www/umbrella/kernel/us/rocketgit" | EXPORT_PATH="/data/www/umbrella/kernel/us/rocketgit" |
File inc/admin.inc.php changed (mode: 100644) (index bbc97d7..18fd2d9) | |||
... | ... | function rg_init($db, $rg) | |
232 | 232 | break; | break; |
233 | 233 | } | } |
234 | 234 | ||
235 | if (!strstr($rg['init']['email'], '@')) { | ||
236 | $errmsg[] = 'invalid e-mail'; | ||
237 | break; | ||
238 | } | ||
239 | |||
235 | 240 | $r = rg_user_edit($db, $rg['init']); | $r = rg_user_edit($db, $rg['init']); |
236 | 241 | if ($r === FALSE) { | if ($r === FALSE) { |
237 | 242 | $errmsg[] = rg_user_error(); | $errmsg[] = rg_user_error(); |
... | ... | function rg_init($db, $rg) | |
240 | 245 | ||
241 | 246 | rg_state_set($db, 'first_install', time()); | rg_state_set($db, 'first_install', time()); |
242 | 247 | ||
248 | // Makes no sense to confirm the admin account | ||
249 | $rg['rg_account_email_confirm'] = 0; | ||
250 | |||
243 | 251 | $ret .= rg_template('user/create_ok.html', $rg, TRUE /* xss */); | $ret .= rg_template('user/create_ok.html', $rg, TRUE /* xss */); |
244 | 252 | $load_form = FALSE; | $load_form = FALSE; |
245 | 253 | break; | break; |
File inc/bug.inc.php changed (mode: 100644) (index db37959..9ae0346) | |||
... | ... | function rg_bug_note_list($db, $repo_id, $bug_id, $offset) | |
1076 | 1076 | $ret = array(); | $ret = array(); |
1077 | 1077 | while (($row = rg_sql_fetch_array($res))) { | while (($row = rg_sql_fetch_array($res))) { |
1078 | 1078 | $row['note_creation'] = gmdate("Y-m-d H:i", $row['itime']) . ' UTC'; | $row['note_creation'] = gmdate("Y-m-d H:i", $row['itime']) . ' UTC'; |
1079 | $row['note_id'] = substr(md5($row['note']), 0, 6); | ||
1079 | 1080 | ||
1080 | 1081 | $_ui = rg_user_info($db, $row['uid'], "", ""); | $_ui = rg_user_info($db, $row['uid'], "", ""); |
1081 | 1082 | if ($_ui['exists'] == 1) { | if ($_ui['exists'] == 1) { |
1082 | 1083 | $row['note_owner'] = $_ui['username']; | $row['note_owner'] = $_ui['username']; |
1084 | $row['note_owner_url'] = rg_base_url() . rg_re_userpage($_ui); | ||
1083 | 1085 | $row['HTML:note_gravatar'] = $_ui['HTML:gravatar']; | $row['HTML:note_gravatar'] = $_ui['HTML:gravatar']; |
1084 | 1086 | } else { | } else { |
1085 | 1087 | $row['note_owner'] = "?"; | $row['note_owner'] = "?"; |
1088 | $row['note_owner_url'] = ''; | ||
1086 | 1089 | $row['HTML:note_gravatar'] = ''; | $row['HTML:note_gravatar'] = ''; |
1087 | 1090 | } | } |
1088 | 1091 |
File inc/init.inc.php changed (mode: 100644) (index 422260d..0c052e5) | |||
... | ... | require_once($INC . "/ver.php"); | |
5 | 5 | ||
6 | 6 | $rg = array(); | $rg = array(); |
7 | 7 | ||
8 | if (ini_get('date.timezone') === FALSE) | ||
9 | init_set('date.timezone', 'UTC'); | ||
8 | if (empty(ini_get('date.timezone'))) | ||
9 | ini_set('date.timezone', 'UTC'); | ||
10 | 10 | ||
11 | 11 | // For escapeshellarg to work with UTF-8, we are forced to set a locale | // For escapeshellarg to work with UTF-8, we are forced to set a locale |
12 | 12 | setlocale(LC_CTYPE, "en_US.UTF-8"); | setlocale(LC_CTYPE, "en_US.UTF-8"); |
File inc/state.inc.php changed (mode: 100644) (index 1159774..54bfaab) | |||
... | ... | function rg_state_set($db, $var, $value) | |
102 | 102 | if (strcmp($old, $value) == 0) | if (strcmp($old, $value) == 0) |
103 | 103 | return TRUE; | return TRUE; |
104 | 104 | ||
105 | if ($old === "") { | ||
106 | $sql = "INSERT INTO state (var, value)" | ||
107 | . " VALUES (@@var@@, @@value@@)"; | ||
108 | } else { | ||
109 | $sql = "UPDATE state SET value = @@value@@" | ||
110 | . " WHERE var = @@var@@"; | ||
111 | } | ||
105 | $sql = 'UPDATE state SET value = @@value@@' | ||
106 | . ' WHERE var = @@var@@'; | ||
112 | 107 | $res = rg_sql_query_params($db, $sql, $params); | $res = rg_sql_query_params($db, $sql, $params); |
113 | 108 | if ($res === FALSE) { | if ($res === FALSE) { |
114 | rg_state_set_error(rg_sql_error()); | ||
109 | rg_state_set_error('cannot update var'); | ||
115 | 110 | break; | break; |
116 | 111 | } | } |
112 | $rows = rg_sql_affected_rows($res); | ||
117 | 113 | rg_sql_free_result($res); | rg_sql_free_result($res); |
118 | 114 | ||
115 | if ($rows == 0) { | ||
116 | $sql = 'INSERT INTO state (var, value)' | ||
117 | . ' VALUES (@@var@@, @@value@@)'; | ||
118 | $res = rg_sql_query_params($db, $sql, $params); | ||
119 | if ($res === FALSE) { | ||
120 | rg_state_set_error('cannot insert into state table'); | ||
121 | break; | ||
122 | } | ||
123 | rg_sql_free_result($res); | ||
124 | } | ||
125 | |||
119 | 126 | rg_cache_set("state::" . $var, $value, RG_SOCKET_NO_WAIT); | rg_cache_set("state::" . $var, $value, RG_SOCKET_NO_WAIT); |
120 | 127 | ||
121 | 128 | $ret = TRUE; | $ret = TRUE; |
File inc/webhooks.inc.php changed (mode: 100644) (index cdd66a3..37920bd) | |||
... | ... | function rg_wh_list_high_level($db, $rg, $paras) | |
40 | 40 | $rg, TRUE /*xss*/); | $rg, TRUE /*xss*/); |
41 | 41 | break; | break; |
42 | 42 | } | } |
43 | if (!empty($errmsg)) { | ||
44 | $rg['HTML:errmsg'] = rg_template_errmsg($errmsg); | ||
45 | $ret .= rg_template('user/settings/wh/delete_err.html', | ||
46 | $rg, TRUE /*xss*/); | ||
47 | } | ||
43 | 48 | ||
44 | 49 | $r = rg_wh_list($db, $rg['login_ui']['uid']); | $r = rg_wh_list($db, $rg['login_ui']['uid']); |
45 | 50 | if ($r['ok'] !== 1) { | if ($r['ok'] !== 1) { |
... | ... | function rg_wh_list_high_level($db, $rg, $paras) | |
51 | 56 | //rg_log_ml('DEBUG: wh_list_high_level: r[list]: ' | //rg_log_ml('DEBUG: wh_list_high_level: r[list]: ' |
52 | 57 | // . print_r($r['list'], TRUE)); | // . print_r($r['list'], TRUE)); |
53 | 58 | $rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_list'); | $rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_list'); |
54 | $rg['HTML:errmsg'] = rg_template_errmsg($errmsg); | ||
55 | 59 | $ret .= rg_template_table('user/settings/wh/list', | $ret .= rg_template_table('user/settings/wh/list', |
56 | 60 | $r['list'], $rg); | $r['list'], $rg); |
57 | 61 | } | } |
... | ... | function rg_wh_add_high_level($db, $rg, $paras) | |
81 | 85 | if (isset($paras[0])) { | if (isset($paras[0])) { |
82 | 86 | $rg['wh']['id'] = intval($paras[0]); | $rg['wh']['id'] = intval($paras[0]); |
83 | 87 | } else { | } else { |
84 | $rg['wh']['id'] = rg_var_str('wh::id'); | ||
88 | $rg['wh']['id'] = rg_var_uint('wh::id'); | ||
85 | 89 | ||
86 | 90 | if (empty($rg['wh']['htype'])) { | if (empty($rg['wh']['htype'])) { |
87 | 91 | $ret .= rg_wh_htypes($rg); | $ret .= rg_wh_htypes($rg); |
... | ... | function rg_wh_add_high_level($db, $rg, $paras) | |
89 | 93 | } | } |
90 | 94 | ||
91 | 95 | } | } |
96 | rg_log('DEBUG: wh::id=' . $rg['wh']['id']); | ||
92 | 97 | ||
93 | 98 | $add = rg_var_uint('add'); | $add = rg_var_uint('add'); |
94 | 99 | while ($add == 1) { | while ($add == 1) { |
... | ... | function rg_wh_add_high_level($db, $rg, $paras) | |
97 | 102 | $rg['wh']['events'] = rg_var_a2s('wh::events'); // TODO | $rg['wh']['events'] = rg_var_a2s('wh::events'); // TODO |
98 | 103 | $rg['wh']['url'] = rg_var_str('wh::url'); | $rg['wh']['url'] = rg_var_str('wh::url'); |
99 | 104 | $rg['wh']['add_ip'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; | $rg['wh']['add_ip'] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; |
100 | $rg['wh']['description'] = rg_var_str('wh::description'); | ||
105 | $rg['wh']['description'] = trim(rg_var_str('wh::description')); | ||
101 | 106 | $rg['wh']['opaque'] = rg_var_str('wh::opaque'); | $rg['wh']['opaque'] = rg_var_str('wh::opaque'); |
102 | 107 | $rg['wh']['key'] = rg_var_str('wh::key'); | $rg['wh']['key'] = rg_var_str('wh::key'); |
103 | 108 | rg_wh_fill_vars($rg); | rg_wh_fill_vars($rg); |
... | ... | function rg_wh_add_high_level($db, $rg, $paras) | |
129 | 134 | break; | break; |
130 | 135 | } | } |
131 | 136 | ||
137 | $hints = array(); | ||
132 | 138 | if ($show_form) { | if ($show_form) { |
133 | 139 | // defaults | // defaults |
134 | 140 | if ($add == 0) { | if ($add == 0) { |
... | ... | function rg_wh_add_high_level($db, $rg, $paras) | |
156 | 162 | ||
157 | 163 | rg_wh_add_form($rg); | rg_wh_add_form($rg); |
158 | 164 | ||
159 | $hints = array(); | ||
160 | $hints[]['HTML:hint'] = rg_template('user/settings/wh/hints.html', | ||
165 | $hints[]['HTML:hint'] = rg_template('user/settings/wh/hints_htype.html', | ||
161 | 166 | $rg, TRUE /*xss*/); | $rg, TRUE /*xss*/); |
162 | 167 | rg_wh_fill_hints($rg, $hints); | rg_wh_fill_hints($rg, $hints); |
163 | $rg['HTML:hints'] = rg_template_table("hints/list", $hints, $rg); | ||
164 | |||
165 | 168 | ||
166 | 169 | $rg['HTML:errmsg'] = rg_template_errmsg($errmsg); | $rg['HTML:errmsg'] = rg_template_errmsg($errmsg); |
167 | 170 | $rg['HTML:check_events'] = rg_wh_check_events($rg['wh']['events']); | $rg['HTML:check_events'] = rg_wh_check_events($rg['wh']['events']); |
168 | 171 | $rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_add'); | $rg['rg_form_token'] = rg_token_get($db, $rg, 'wh_add'); |
169 | 172 | $ret .= rg_template('user/settings/wh/add_edit.html', | $ret .= rg_template('user/settings/wh/add_edit.html', |
170 | 173 | $rg, TRUE /*xss*/); | $rg, TRUE /*xss*/); |
174 | } else { | ||
175 | $hints[]['HTML:hint'] = rg_template('user/settings/wh/hints.html', | ||
176 | $rg, TRUE /*xss*/); | ||
171 | 177 | } | } |
172 | 178 | ||
179 | $ret .= rg_template_table("hints/list", $hints, $rg); | ||
180 | |||
173 | 181 | rg_log_exit(); | rg_log_exit(); |
174 | 182 | rg_prof_end('wh_add_high_level'); | rg_prof_end('wh_add_high_level'); |
175 | 183 | return $ret; | return $ret; |
File inc/wh/core.inc.php changed (mode: 100644) (index 3597cae..b687018) | |||
... | ... | function rg_wh_validate_vars($rg, &$errmsg) | |
362 | 362 | ||
363 | 363 | $ret = FALSE; | $ret = FALSE; |
364 | 364 | while (1) { | while (1) { |
365 | if (empty($rg['wh']['events'])) { | ||
366 | $errmsg[] = rg_template('user/settings/wh/inv_events.txt', | ||
367 | $rg, TRUE /*xss*/); | ||
368 | break; | ||
369 | } | ||
370 | |||
365 | 371 | $t = $rg['wh']['htype']; | $t = $rg['wh']['htype']; |
366 | 372 | ||
367 | 373 | if (!isset($rg_wh_plugins[$t])) { | if (!isset($rg_wh_plugins[$t])) { |
368 | $errmsg[] = rg_template('user/settings/wh/invalid_htype', | ||
374 | $errmsg[] = rg_template('user/settings/wh/invalid_htype.txt', | ||
369 | 375 | $rg, TRUE /*xss*/); | $rg, TRUE /*xss*/); |
370 | 376 | break; | break; |
371 | 377 | } | } |
File root/themes/default/main.css changed (mode: 100644) (index 0dbcb50..8f575d6) | |||
... | ... | legend { padding: 0px 2pt; } | |
254 | 254 | border: 1px solid #999998; | border: 1px solid #999998; |
255 | 255 | padding: 5pt; | padding: 5pt; |
256 | 256 | border-radius: 4px 4px 4px 4px; | border-radius: 4px 4px 4px 4px; |
257 | display: flex; | ||
258 | flex-flow: column nowrap; | ||
259 | 257 | align-self: center; | align-self: center; |
260 | 258 | } | } |
261 | 259 | ||
... | ... | legend { padding: 0px 2pt; } | |
278 | 276 | ||
279 | 277 | .wh_list {} | .wh_list {} |
280 | 278 | ||
281 | .wh_plugins_list {} | ||
279 | .wh_plugins_list { | ||
280 | margin-top: 5pt; | ||
281 | } | ||
282 | 282 | ||
283 | 283 | .blob_title { | .blob_title { |
284 | 284 | font-size: 11pt; | font-size: 11pt; |
... | ... | legend { padding: 0px 2pt; } | |
371 | 371 | .form_error p { padding-left: 15pt; } | .form_error p { padding-left: 15pt; } |
372 | 372 | ||
373 | 373 | .labels { padding: 3px 0px; margin: 3px 0px; } | .labels { padding: 3px 0px; margin: 3px 0px; } |
374 | .labels ul { list-style-type: none; } | ||
374 | .labels ul { | ||
375 | list-style-type: none; | ||
376 | display: inline; | ||
377 | } | ||
375 | 378 | .labels ul li { | .labels ul li { |
376 | 379 | display: inline; | display: inline; |
377 | 380 | padding: 3px 3px; | padding: 3px 3px; |
... | ... | legend { padding: 0px 2pt; } | |
458 | 461 | margin-top: 5px; | margin-top: 5px; |
459 | 462 | padding: 5px; | padding: 5px; |
460 | 463 | box-shadow: 0px 2px 3px #666666; | box-shadow: 0px 2px 3px #666666; |
461 | display: flex; | ||
462 | flex-flow: row nowrap; | ||
463 | flex-grow: 0; | ||
464 | align-self: flex-start; | ||
464 | 465 | } | } |
465 | 466 | ||
466 | 467 | .error { | .error { |
File root/themes/default/repo/bug/list_labels/header.html changed (mode: 100644) (index 71233bc..2dcbaad) | |||
1 | 1 | <div class="labels"> | <div class="labels"> |
2 | <b>Labels:</b> | ||
2 | 3 | <ul> | <ul> |
File root/themes/default/repo/bug/list_note/line.html changed (mode: 100644) (index 8d41a53..0ae01ef) | |||
1 | <a name="note-@@note_id@@"></a> | ||
1 | 2 | <div class="note"> | <div class="note"> |
2 | @@note_gravatar@@ | ||
3 | @@if(@@note_owner_url@@ == ""){{@@note_gravatar@@}}{{<a href="@@note_owner_url@@">@@note_gravatar@@</a>}} | ||
3 | 4 | ||
4 | 5 | <div class="note_body"> | <div class="note_body"> |
5 | <b>@@note_owner@@</b> - @@note_creation@@<br /> | ||
6 | <b>@@if(@@note_owner_url@@ == ""){{@@note_owner@@}}{{<a href="@@note_owner_url@@">@@note_owner@@</a>}}</b> - @@note_creation@@ - <a href="@@bug::bug_id@@#note-@@note_id@@">Link</a><br /> | ||
6 | 7 | @@note_nlbr@@ | @@note_nlbr@@ |
7 | 8 | </div> | </div> |
8 | 9 | </div> | </div> |
File root/themes/default/tos.html changed (mode: 100644) (index f0a1ea5..f6fc669) | |||
5 | 5 | <div class="island_cell"> | <div class="island_cell"> |
6 | 6 | <div class="island"> | <div class="island"> |
7 | 7 | ||
8 | The RocketGit code is copyright (c) 2015 Catalin BOIE and it is | ||
8 | The RocketGit code is copyright (c) 2016 Catalin BOIE and it is | ||
9 | 9 | covered by the | covered by the |
10 | 10 | <a href="https://gnu.org/licenses/agpl.html">Affero GPLv3+</a> | <a href="https://gnu.org/licenses/agpl.html">Affero GPLv3+</a> |
11 | 11 | license.<br /> | license.<br /> |
File root/themes/default/user/create_ok.html changed (mode: 100644) (index b0d512d..07707da) | |||
1 | 1 | <div class="mess ok"> | <div class="mess ok"> |
2 | 2 | Your account has been successfully created. | Your account has been successfully created. |
3 | 3 | @@if(@@rg_account_email_confirm@@ == 1){{ | @@if(@@rg_account_email_confirm@@ == 1){{ |
4 | <br />You must confirm the account before you can login. | ||
5 | <br />Check you e-mail for instructions. | ||
6 | }} | ||
7 | {{ | ||
8 | <br />You can login right now, without e-mail confirmation. | ||
4 | <br />You must confirm the account before you can login. | ||
5 | <br />Check your e-mail for instructions. | ||
6 | }}{{ | ||
7 | <br />You can login right now, without e-mail confirmation. | ||
9 | 8 | }} | }} |
10 | 9 | </div> | </div> |
File root/themes/default/user/login.html changed (mode: 100644) (index e25bc66..083ee69) | |||
34 | 34 | ||
35 | 35 | <input type="submit" name="button" value="Login" /> | <input type="submit" name="button" value="Login" /> |
36 | 36 | </form> | </form> |
37 | <br /> | ||
38 | 37 | ||
38 | <br /> | ||
39 | 39 | <a href="@@forgot_send@@">Forgot your password?</a> | <a href="@@forgot_send@@">Forgot your password?</a> |
40 | 40 | ||
41 | 41 | @@if(@@rg_account_allow_creation@@ == 1){{ | @@if(@@rg_account_allow_creation@@ == 1){{ |
File root/themes/default/user/settings/wh/add_edit.html changed (mode: 100644) (index da7c0c4..5529dfa) | |||
40 | 40 | </form> | </form> |
41 | 41 | </div> | </div> |
42 | 42 | ||
43 | @@hints@@ |
File root/themes/default/user/settings/wh/delete_err.html added (mode: 100644) (index 0000000..5386532) | |||
1 | <div class="mess error"> | ||
2 | Error deleting webhook(s); try again later. | ||
3 | </div> |
File root/themes/default/user/settings/wh/hints.html changed (mode: 100644) (index d1ff372..ac3d3a3) | |||
1 | 1 | <br /> | <br /> |
2 | 2 | Webhooks helps you to trigger some actions on your server when an event | Webhooks helps you to trigger some actions on your server when an event |
3 | happens with you repositories.<br /> | ||
4 | <br /> | ||
5 | |||
6 | HMAC SHA512 key: it is a string that will be used to sign the payload; | ||
7 | this way you can be sure that the server knows the secret and you can go on to | ||
8 | process the request. You can use any character you want: letters, digits and | ||
9 | any symbol.<br /> | ||
10 | The server will create a HMAC over the payload using SHA512 and will add | ||
11 | a HTTP header: <i>X-RocketGit-Signature: <signature></i>. It is | ||
12 | recommended to verify it before parsing the body, for security reasons. | ||
13 | It is not generated for <i>application/x-www-form-urlencoded</i> encoding.<br /> | ||
3 | happens with your repositories.<br /> |
File root/themes/default/user/settings/wh/hints_htype.html copied from file root/themes/default/user/settings/wh/hints.html (similarity 82%) (mode: 100644) (index d1ff372..1896446) | |||
1 | 1 | <br /> | <br /> |
2 | Webhooks helps you to trigger some actions on your server when an event | ||
3 | happens with you repositories.<br /> | ||
4 | <br /> | ||
5 | |||
6 | 2 | HMAC SHA512 key: it is a string that will be used to sign the payload; | HMAC SHA512 key: it is a string that will be used to sign the payload; |
7 | 3 | this way you can be sure that the server knows the secret and you can go on to | this way you can be sure that the server knows the secret and you can go on to |
8 | 4 | process the request. You can use any character you want: letters, digits and | process the request. You can use any character you want: letters, digits and |
File root/themes/default/user/settings/wh/inv_events.txt added (mode: 100644) (index 0000000..5675d45) | |||
1 | No events selected. |
File root/themes/default/user/settings/wh/inv_htype.txt added (mode: 100644) (index 0000000..bce4e38) | |||
1 | Invalid plugin type. |
File root/themes/default/user/settings/wh/list/header.html changed (mode: 100644) (index 083e55b..91e537e) | |||
1 | 1 | <div class="wh_list"> | <div class="wh_list"> |
2 | 2 | ||
3 | @@errmsg@@ | ||
4 | |||
5 | 3 | <form method="post" action="/op/settings/wh/list"> | <form method="post" action="/op/settings/wh/list"> |
6 | 4 | <input type="hidden" name="delete" value="1" /> | <input type="hidden" name="delete" value="1" /> |
7 | 5 | <input type="hidden" name="token" value="@@rg_form_token@@" /> | <input type="hidden" name="token" value="@@rg_form_token@@" /> |
File root/themes/default/user/settings/wh/list/nodata.html changed (mode: 100644) (index 8408cd3..45815b7) | |||
1 | @@del_status@@ | ||
2 | |||
3 | 1 | <div class="mess ok"> | <div class="mess ok"> |
4 | 2 | No webhooks present. | No webhooks present. |
5 | 3 | </div> | </div> |
File root/themes/default/user/settings/wh/plugins_list/header.html changed (mode: 100644) (index 32e34eb..7b2add5) | |||
1 | 1 | <div class="wh_plugins_list"> | <div class="wh_plugins_list"> |
2 | 2 | ||
3 | Please choose one of the following plugin types: | ||
3 | 4 | <table summary="webhooks types"> | <table summary="webhooks types"> |
4 | 5 | <tr> | <tr> |
5 | 6 | <th>Name</th> | <th>Name</th> |
File scripts/cache.php changed (mode: 100644) (index 00955bf..47e1ebb) | |||
... | ... | set_time_limit(0); | |
9 | 9 | // Increment this if we need to restart this daemon (protocol changes etc.) | // Increment this if we need to restart this daemon (protocol changes etc.) |
10 | 10 | $rg_cache_version = 36; | $rg_cache_version = 36; |
11 | 11 | ||
12 | $now = time(); | ||
13 | 12 | $_s = microtime(TRUE); | $_s = microtime(TRUE); |
14 | 13 | ||
15 | 14 | require_once("/etc/rocketgit/config.php"); | require_once("/etc/rocketgit/config.php"); |
File scripts/cachec.php changed (mode: 100644) (index f74357e..f51258f) | |||
... | ... | error_reporting(E_ALL); | |
4 | 4 | ini_set("track_errors", "On"); | ini_set("track_errors", "On"); |
5 | 5 | set_time_limit(0); | set_time_limit(0); |
6 | 6 | ||
7 | $now = time(); | ||
8 | 7 | $_s = microtime(TRUE); | $_s = microtime(TRUE); |
9 | 8 | ||
10 | 9 | require_once("/etc/rocketgit/config.php"); | require_once("/etc/rocketgit/config.php"); |
File scripts/common.sh changed (mode: 100644) (index ba4a7e2..902992e) | |||
3 | 3 | # Be sure we are running under correct context | # Be sure we are running under correct context |
4 | 4 | function check_context() | function check_context() |
5 | 5 | { | { |
6 | selinuxenabled | ||
6 | /usr/sbin/selinuxenabled | ||
7 | 7 | if [ "${?}" != "0" ]; then | if [ "${?}" != "0" ]; then |
8 | 8 | return | return |
9 | 9 | fi | fi |
File scripts/cron.php changed (mode: 100644) (index db7cc6a..c03d79a) | |||
... | ... | error_reporting(E_ALL); | |
4 | 4 | ini_set("track_errors", "On"); | ini_set("track_errors", "On"); |
5 | 5 | set_time_limit(0); | set_time_limit(0); |
6 | 6 | ||
7 | $now = time(); | ||
8 | |||
9 | 7 | require_once("/etc/rocketgit/config.php"); | require_once("/etc/rocketgit/config.php"); |
10 | 8 | ||
11 | 9 | $INC = dirname(__FILE__) . "/../inc"; | $INC = dirname(__FILE__) . "/../inc"; |
... | ... | require_once($INC . "/mr.inc.php"); | |
20 | 18 | require_once($INC . "/admin.inc.php"); | require_once($INC . "/admin.inc.php"); |
21 | 19 | require_once($INC . "/ver.php"); | require_once($INC . "/ver.php"); |
22 | 20 | ||
21 | $now = time(); | ||
23 | 22 | $user = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : "rocketgit"; | $user = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : "rocketgit"; |
24 | 23 | ||
25 | 24 | if (strcmp($user, "apache") == 0) { | if (strcmp($user, "apache") == 0) { |
File scripts/events.php changed (mode: 100644) (index 30ba1f0..3a64823) | |||
... | ... | error_reporting(E_ALL); | |
7 | 7 | ini_set("track_errors", "On"); | ini_set("track_errors", "On"); |
8 | 8 | set_time_limit(0); | set_time_limit(0); |
9 | 9 | ||
10 | $now = time(); | ||
11 | 10 | $_s = microtime(TRUE); | $_s = microtime(TRUE); |
12 | 11 | ||
13 | 12 | require_once("/etc/rocketgit/config.php"); | require_once("/etc/rocketgit/config.php"); |
File scripts/wake.php changed (mode: 100644) (index 04e15e6..47a7cef) | |||
4 | 4 | error_reporting(E_ALL); | error_reporting(E_ALL); |
5 | 5 | ini_set("track_errors", "On"); | ini_set("track_errors", "On"); |
6 | 6 | ||
7 | $now = time(); | ||
8 | 7 | $_s = microtime(TRUE); | $_s = microtime(TRUE); |
9 | 8 | ||
10 | 9 | require_once("/etc/rocketgit/config.php"); | require_once("/etc/rocketgit/config.php"); |