Skip to content

Commit 2037064

Browse files
committed
ncp-web: disable activation page once activated
Signed-off-by: nachoparker <nacho@ownyourbits.com>
1 parent 714c3e5 commit 2037064

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

build/docker/nextcloudpi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ COPY ncp.sh update.sh post-inst.sh /tmp/ncp-build/
1919
COPY ncp-web /tmp/ncp-build/ncp-web/
2020
COPY ncp-app /tmp/ncp-build/ncp-app/
2121
COPY ncp-previewgenerator /tmp/ncp-build/ncp-previewgenerator/
22-
COPY build/docker /tmp/ncp-build/docker/
22+
COPY build/docker /tmp/ncp-build/build/docker/
2323
COPY etc/ncp-config.d/nc-init.cfg /usr/local/etc/ncp-config.d/nc-init-copy.cfg
2424

2525
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \

changelog.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
[v1.39.20](https://github.com/nextcloud/nextcloudpi/commit/7188050) (2021-10-04) ncp-config: fix first time error with no known latest version
2+
[v1.39.21](https://github.com/nextcloud/nextcloudpi/commit/a4fdff6) (2021-10-04) ncp-web: disable activation page once activated
3+
4+
[v1.39.20](https://github.com/nextcloud/nextcloudpi/commit/714c3e5) (2021-10-04) ncp-config: fix first time error with no known latest version
35

46
[v1.39.19](https://github.com/nextcloud/nextcloudpi/commit/05f0d35) (2021-09-30) ncp-web: fix upload from local file path
57

ncp-web/activate/index.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
<?php session_start(); ?>
1+
<?php
2+
// disallow once activated
3+
exec("a2query -s ncp-activation", $output, $ret);
4+
if ($ret != 0) {
5+
http_response_code(404);
6+
exit();
7+
}
8+
session_start();
9+
?>
210
<!DOCTYPE html>
311
<html class="ng-csp" data-placeholder-focus="false" lang="en">
412
<head>
@@ -10,7 +18,7 @@
1018
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
1119
<meta http-equiv="cache-control" content="no-cache">
1220
<meta http-equiv="pragma" content="no-cache">
13-
<link rel="icon" type="image/png" href="img/favicon.png"/>
21+
<link rel="icon" type="image/png" href="../img/favicon.png"/>
1422
<link rel="stylesheet" href="CSS.css">
1523
</head>
1624
<body id="body-login">

0 commit comments

Comments
 (0)