solid-server 5.6.14 → 5.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,90 @@
1
+ .index-page {
2
+ background-color: #f8f8f8;
3
+ font-size: 1em;
4
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
5
+ }
6
+
7
+ .index-page dt {
8
+ font-weight: bold;
9
+ }
10
+
11
+ .index-page dd {
12
+ margin: 0;
13
+ }
14
+
15
+ .index-page .header {
16
+ box-shadow: 0px 1px 4px rgba(0,0.0,0.2) !important;
17
+ -webkit-box-shadow: 0px 1px 4px rgba(0,0.0,0.2) !important;
18
+ text-align: center !important;
19
+ color: #7C4DFF;
20
+ padding: 10px;
21
+ display: inline-flex;
22
+ width: 99%;
23
+ }
24
+
25
+ .index-page .header-left {
26
+ text-align: left;
27
+ margin-top: 0.67em;
28
+ width: 19%;
29
+ }
30
+
31
+ .index-page .header-center {
32
+ margin: auto;
33
+ }
34
+
35
+ @media screen and (max-width: 1000px) {
36
+ .header-right {
37
+ display: block !important;
38
+ }
39
+ }
40
+
41
+ .header-right {
42
+ display: inline-flex;
43
+ margin-top: 0.67em;
44
+ min-width: 19%;
45
+ }
46
+
47
+ .index-page .logo-img {
48
+ width: 50px;
49
+ }
50
+
51
+ .index-page .title {
52
+ color: #7C4DFF;
53
+ font-size: 2em;
54
+ line-height: 1em;
55
+ }
56
+
57
+ .index-page .container {
58
+ position: relative;
59
+ display: flex;
60
+ flex-direction: column;
61
+ flex-wrap: row wrap;
62
+ margin: auto;
63
+ width: 50%;
64
+ line-height: 1.6;
65
+ }
66
+
67
+ .index-page .content {
68
+ display: block;
69
+ }
70
+
71
+ .index-page .webId {
72
+ text-align: center;
73
+ -webkit-box-shadow: 0px 1px 4px #7C4DFF !important;
74
+ }
75
+
76
+ .index-page .logo {
77
+ color: #f8f8f8;
78
+ }
79
+
80
+ .index-page .register-button {
81
+ padding: 1em;
82
+ border-radius:0.5em;
83
+ font-size: 100%;
84
+ background-color: #efe;
85
+ margin-right: 1em;
86
+ }
87
+
1
88
  .panel-login-tls,
2
89
  .panel-already-registered{
3
90
  text-align: center;
@@ -0,0 +1,9 @@
1
+ <svg width="352" height="322" xmlns="http://www.w3.org/2000/svg">
2
+ <g fill-rule="nonzero" fill="none">
3
+ <path d="M87.97296 282.3527L27.24133 177.02207c-5.62041-9.75765-5.62041-21.77908 0-31.53674L87.97296 40.2328c5.64643-9.78367 16.08061-15.79439 27.32143-15.79439h121.3852c11.26684 0 21.72704 6.01072 27.32143 15.7944l60.75765 105.30458c5.62041 9.75766 5.62041 21.77909 0 31.53674l-60.73163 105.33061c-5.64643 9.78367-16.08061 15.79439-27.32143 15.79439H115.37245c-11.31888-.05204-21.72704-6.08878-27.3995-15.84643z" fill="#FFF"/>
4
+ <path d="M93.15102 275.19708l-57.1148-99.0597c-5.30816-9.1852-5.30816-20.50408 0-29.66326l57.1148-99.08572c5.33418-9.21122 15.14388-14.85765 25.73418-14.85765h114.2296c10.5903 0 20.42602 5.64643 25.73418 14.85765l57.16684 99.03368c5.30816 9.1852 5.30816 20.50408 0 29.66326L258.875 275.2231c-5.33418 9.21122-15.14388 14.85765-25.73418 14.85765H118.93724c-10.64234 0-20.45204-5.67245-25.78622-14.88367z" fill="#7C4DFF"/>
5
+ <path d="M118.46888 142.2328h117.53418c1.48316 0 2.65408-1.19695 2.65408-2.65409v-22.03928c0-14.6495-11.89132-26.54085-26.54081-26.54085h-70.56735c-20.5301-.026-37.15722 16.60105-37.15722 37.13115-.02594 7.83214 6.271 14.10306 14.07712 14.10306zM129.99592 239.60116H200.225c21.20663 0 38.43214-17.22551 38.43214-38.43214 0-7.07755-5.72449-12.82806-12.82806-12.82806H106.94184c-1.45715 0-2.55005 1.17091-2.55005 2.55v23.05408c-.02597 14.18112 11.47505 25.65612 25.60413 25.65612z" fill="#F7F7F7"/>
6
+ <path d="M109.59592 139.3185l87.66275 87.66276c5.80255 5.80255 15.19592 5.80255 20.99847 0l15.19592-15.19592c5.80255-5.80255 5.80255-15.19591 0-20.99847l-87.63673-87.66275c-5.80255-5.80255-15.19592-5.80255-20.99847 0l-15.19592 15.19592c-5.8546 5.80255-5.8546 15.22194-.02602 20.99847z" fill="#F7F7F7"/>
7
+ <path fill="#444" opacity=".3" d="M198.6898 228.46443l-51.4944-40.12347h11.39695zM144.35918 101.66698l40.56582 40.56581h13.7648z"/>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,41 @@
1
+ 'use strict'
2
+ var keyname = 'SolidServerRootRedirectLink';
3
+ function register() {
4
+ alert(2); window.location.href = "/register";
5
+ }
6
+ document.addEventListener('DOMContentLoaded', async function() {
7
+ if (!UI.authn.currentUser()) await UI.authn.checkUser();
8
+ let user = UI.authn.currentUser();
9
+
10
+ // IF LOGGED IN: SET SolidServerRootRedirectLink. LOGOUT
11
+ if( user ) {
12
+ window.localStorage.setItem(keyname, user.uri);
13
+ await UI.authn.authSession.logout();
14
+ }
15
+ else {
16
+ let webId = window.localStorage.getItem(keyname);
17
+
18
+ // IF NOT LOGGED IN AND COOKIE EXISTS: REMOVE COOKIE, HIDE WELCOME, SHOW LINK TO PROFILE
19
+ if( webId ) {
20
+ window.localStorage.removeItem(keyname);
21
+ document.getElementById('loggedIn').style.display = "block";
22
+ document.getElementById('loggedIn').innerHTML = `<p>Your WebID is : <a href="${webId}">${webId}</a>.</p> <p>Visit your profile to log into your Pod.</p>`;
23
+ }
24
+
25
+ // IF NOT LOGGED IN AND COOKIE DOES NOT EXIST
26
+ // SHOW WELCOME, SHOW LOGIN BUTTON
27
+ // HIDE LOGIN BUTTON, ADD REGISTER BUTTON
28
+ else {
29
+ let loginArea = document.getElementById('loginStatusArea');
30
+ let html = `<input type="button" onclick="window.location.href='/register'" value="Register to get a Pod" class="register-button">`
31
+ let span = document.createElement("span")
32
+ span.innerHTML = html
33
+ loginArea.appendChild(span);
34
+ loginArea.appendChild(UI.authn.loginStatusBox(document, null, {}))
35
+ const logInButton = loginArea.querySelectorAll('input')[1];
36
+ logInButton.value = "Log in to see your WebID";
37
+ const signUpButton = loginArea.querySelectorAll('input')[2];
38
+ signUpButton.style.display = "none";
39
+ }
40
+ }
41
+ })
@@ -1,108 +1,54 @@
1
- <!doctype html><html><head>
1
+ <!doctype html>
2
+ <html>
3
+ <head>
2
4
  <meta charset="utf-8"/>
3
- <link rel="stylesheet" href="/common/css/bootstrap.min.css">
4
5
  <link rel="stylesheet" href="/common/css/solid.css">
5
- <script>
6
- var keyname = 'SolidServerRootRedirectLink';
7
- function register(){ alert(2); window.location.href="/register"; }
8
- document.addEventListener('DOMContentLoaded', async function() {
9
- if (!UI.authn.currentUser()) await UI.authn.checkUser();
10
- let user = UI.authn.currentUser();
11
-
12
- // IF LOGGED IN: SET COOKIE. LOGOUT
13
- //
14
- if( user ) {
15
- window.localStorage.setItem(keyname,user.uri);
16
- await UI.authn.authSession.logout();
17
- }
18
- else {
19
- let webId = window.localStorage.getItem(keyname);
20
-
21
- // IF NOT LOGGED IN AND COOKIE EXISTS: REMOVE COOKIE, HIDE WELCOME, SHOW LINK TO PROFILE
22
- //
23
- if( webId ) {
24
- window.localStorage.removeItem(keyname);
25
- document.getElementById('prototype').style.display = "none";
26
- document.getElementById('loggedIn').style.display = "block";
27
- document.getElementById('loggedIn').innerHTML = `<p>Your WebID and profile address are</p> <p> &lt;${webId}&gt.</p><a href="${webId}">Visit your profile to log in.</a></div>`;
28
- }
29
-
30
- // IF NOT LOGGED IN AND COOKIE DOES NOT EXIST
31
- // SHOW WELCOME, SHOW LOGIN BUTTON
32
- // HIDE LOGIN BUTTON, ADD REGISTER BUTTON
33
- //
34
- else {
35
- let loginArea = document.getElementById('loginStatusArea');
36
- document.getElementById('prototype').style.display = "block";
37
- let html = `<input type="button" onclick="window.location.href='/register'" value="register" style="padding: 1em; border-radius:0.5em; font-size: 100%;background-color: #efe;">`
38
- let span = document.createElement("SPAN")
39
- span.innerHTML=html
40
- loginArea.appendChild(span);
41
- loginArea.appendChild(UI.authn.loginStatusBox(document, null, {}))
42
- const signUpButton = loginArea.querySelectorAll('input')[2];
43
- signUpButton.style.display="none";
44
- }
45
- }
46
- })
47
- </script>
48
- <link href="/mash.css" rel="stylesheet">
49
- </head><body class="db-layout">
50
-
51
- <h3 style="padding:2em; border:8px solid #7C4DFF; display:none" id="loggedIn" class="container"></h3>
52
-
53
- <div id="prototype" class="container">
54
-
55
- <div class="page-header" style="display: inline-flex;">
56
- <h1>Welcome to the Solid Prototype</h1>
57
- <div id="loginStatusArea" class="pull-right" style="display: inline-flex;float: right;margin: 10px;"></div>
58
-
59
- </div>
60
-
61
- <p class="lead">
62
- This is a prototype implementation of a Solid server.
63
-
64
- It is a fully functional server, but there are no security or stability guarantees.
65
-
66
- If you have not already done so, please create an account.
67
- </p>
68
-
69
- <section>
70
- {{#if serverLogo}}
71
- <img src="{{serverLogo}}" />
72
- {{/if}}
73
- <h2>Server info</h2>
74
- <dl>
75
- <dt>Name</dt>
76
- <dd>{{serverName}}</dd>
77
- {{#if serverDescription}}
78
- <dt>Description</dt>
79
- <dd>{{serverDescription}}</dd>
6
+ </head>
7
+ <body class="index-page">
8
+ <div class="header">
9
+ <div class="header-left">
10
+ {{#if serverLogo}}
11
+ <img class="logo-img" src="{{serverLogo}}" />
80
12
  {{/if}}
81
- <dt>Details</dt>
82
- <dd>Running on <a href="https://github.com/solid/node-solid-server/releases/tag/v{{serverVersion}}">Solid {{serverVersion}}</a></dd>
83
- </dl>
84
- </section>
85
- </div>
86
- <header class="db-layout__header header" id="PageHeader"></header>
87
- <div class="TabulatorOutline db-layout__content" id="DummyUUID" role="main">
88
- <table id="outline"></table>
89
- <div id="GlobalDashboard"></div>
90
- </div><footer class="db-layout__footer" id="PageFooter"></footer>
91
- <style>
92
- #prototype {
93
- margin : 2em;
94
- padding : 1em;
95
- }
96
- #prototype input {
97
- margin : 1em;
98
- padding : 0.5em !important;
99
- }
100
- #loginStatusArea {
101
- float:right;
102
- clear:right;
103
- margin-top:-5em;
104
- }
105
- </style>
13
+ </div>
14
+ <div class="header-center">
15
+ <h1 class="title">Welcome to Solid prototype</h1>
16
+ </div>
17
+ <div class="header-right" id="loginStatusArea"></div>
18
+ </div>
19
+
20
+ <div class="container" id="prototype">
21
+
22
+ <h3 style="display:none" id="loggedIn" class="webId"></h3>
23
+
24
+ <div class="content">
25
+
26
+ <p class="lead">
27
+ This is a prototype implementation of a Solid server.
28
+ It is a fully functional server, but there are no security or stability guarantees.
29
+ If you have not already done so, please register.
30
+ </p>
31
+
32
+ <section>
33
+ <h2>Server info</h2>
34
+ <dl>
35
+ <dt>Name</dt>
36
+ <dd>{{serverName}}</dd>
37
+ {{#if serverDescription}}
38
+ <dt>Description</dt>
39
+ <dd>{{serverDescription}}</dd>
40
+ {{/if}}
41
+ <dt>Details</dt>
42
+ <dd>Running on <a href="https://github.com/solid/node-solid-server/releases/tag/v{{serverVersion}}">Node Solid Server {{serverVersion}}</a></dd>
43
+ </dl>
44
+ </section>
45
+
46
+ </div> <!-- end content-->
47
+
48
+ </div> <!-- end container-->
106
49
 
107
50
  <script src="/mashlib.js"></script>
108
- </body></html>
51
+ <script src="/common/js/index-buttons.js"></script>
52
+
53
+ </body>
54
+ </html>
@@ -87,15 +87,27 @@ class ACLChecker {
87
87
  }
88
88
  let accessDenied = aclCheck.accessDenied(acl.graph, resource, directory, aclFile, agent, modes, agentOrigin, trustedOrigins, originTrustedModes)
89
89
 
90
+ function accessDeniedForAccessTo (mode) {
91
+ const accessDeniedAccessTo = aclCheck.accessDenied(acl.graph, directory, null, aclFile, agent, [ACL(mode)], agentOrigin, trustedOrigins, originTrustedModes)
92
+ const accessResult = !accessDenied && !accessDeniedAccessTo
93
+ accessDenied = accessResult ? false : accessDenied || accessDeniedAccessTo
94
+ // debugCache('accessDenied result ' + accessDenied)
95
+ }
90
96
  // For create and update HTTP methods
91
97
  if ((method === 'PUT' || method === 'PATCH' || method === 'COPY') && directory) {
92
98
  // if resource and acl have same parent container,
93
99
  // and resource does not exist, then accessTo Append from parent is required
94
100
  if (directory.value === dirname(aclFile.value) + '/' && !resourceExists) {
95
- const accessDeniedAccessTo = aclCheck.accessDenied(acl.graph, directory, null, aclFile, agent, [ACL('Append')], agentOrigin, trustedOrigins, originTrustedModes)
96
- const accessResult = !accessDenied && !accessDeniedAccessTo
97
- accessDenied = accessResult ? false : accessDenied || accessDeniedAccessTo
98
- // debugCache('accessDenied result ' + accessDenied)
101
+ accessDeniedForAccessTo('Append')
102
+ }
103
+ }
104
+
105
+ // For delete HTTP method
106
+ if ((method === 'DELETE') && directory) {
107
+ // if resource and acl have same parent container,
108
+ // then accessTo Write from parent is required
109
+ if (directory.value === dirname(aclFile.value) + '/') {
110
+ accessDeniedForAccessTo('Write')
99
111
  }
100
112
  }
101
113
  if (accessDenied && user) {
@@ -20,16 +20,26 @@ async function parsePatchDocument (targetURI, patchURI, patchText) {
20
20
 
21
21
  // Query the N3 document for insertions and deletions
22
22
  let firstResult
23
- try {
23
+ try { // solid/protocol v0.9.0
24
24
  firstResult = await queryForFirstResult(patchGraph, `${PREFIXES}
25
25
  SELECT ?insert ?delete ?where WHERE {
26
- ?patch solid:patches <${targetURI}>.
26
+ ?patch a solid:InsertDeletePatch.
27
27
  OPTIONAL { ?patch solid:inserts ?insert. }
28
28
  OPTIONAL { ?patch solid:deletes ?delete. }
29
29
  OPTIONAL { ?patch solid:where ?where. }
30
30
  }`)
31
31
  } catch (err) {
32
- throw error(400, `No patch for ${targetURI} found.`, err)
32
+ try { // deprecated, kept for compatibility
33
+ firstResult = await queryForFirstResult(patchGraph, `${PREFIXES}
34
+ SELECT ?insert ?delete ?where WHERE {
35
+ ?patch solid:patches <${targetURI}>.
36
+ OPTIONAL { ?patch solid:inserts ?insert. }
37
+ OPTIONAL { ?patch solid:deletes ?delete. }
38
+ OPTIONAL { ?patch solid:where ?where. }
39
+ }`)
40
+ } catch (err) {
41
+ throw error(400, 'No n3-patch found.', err)
42
+ }
33
43
  }
34
44
 
35
45
  // Return the insertions and deletions as an rdflib patch document
@@ -1,6 +1,6 @@
1
1
  module.exports = handler
2
2
 
3
- const Busboy = require('busboy')
3
+ const Busboy = require('@fastify/busboy')
4
4
  const debug = require('debug')('solid:post')
5
5
  const path = require('path')
6
6
  const header = require('../header')
package/lib/header.js CHANGED
@@ -66,7 +66,8 @@ async function linksHandler (req, res, next) {
66
66
  return next(error(404, 'Trying to access metadata file as regular file'))
67
67
  }
68
68
  const fileMetadata = new metadata.Metadata()
69
- if (filename.endsWith('/')) {
69
+ if (req.path.endsWith('/')) {
70
+ // do not add storage header in serverUri
70
71
  if (req.path === '/') fileMetadata.isStorage = true
71
72
  fileMetadata.isContainer = true
72
73
  fileMetadata.isBasicContainer = true
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-server",
3
3
  "description": "Solid server on top of the file-system",
4
- "version": "5.6.14",
4
+ "version": "5.6.18",
5
5
  "author": {
6
6
  "name": "Tim Berners-Lee",
7
7
  "email": "timbl@w3.org"
@@ -45,6 +45,10 @@
45
45
  "name": "Arne Hassel",
46
46
  "email": "arne.hassel@inrupt.com",
47
47
  "url": "https://icanhasweb.net/"
48
+ },
49
+ {
50
+ "name": "Alain Bourgeois",
51
+ "url": "https://github.com/bourgeoa/"
48
52
  }
49
53
  ],
50
54
  "license": "MIT",
@@ -55,21 +59,21 @@
55
59
  "homepage": "https://github.com/solid/node-solid-server",
56
60
  "bugs": "https://github.com/solid/node-solid-server/issues",
57
61
  "dependencies": {
62
+ "@fastify/busboy": "^1.0.0",
58
63
  "@solid/acl-check": "^0.4.5",
59
64
  "@solid/oidc-auth-manager": "^0.24.1",
60
65
  "@solid/oidc-op": "0.11.5",
61
66
  "async-lock": "^1.3.0",
62
- "body-parser": "^1.19.0",
67
+ "body-parser": "^1.19.1",
63
68
  "bootstrap": "^3.4.1",
64
- "busboy": "^0.3.1",
65
69
  "cached-path-relative": "^1.0.2",
66
70
  "camelize": "^1.0.0",
67
71
  "cheerio": "^1.0.0-rc.10",
68
72
  "colorette": "^2.0.16",
69
73
  "commander": "^8.3.0",
70
74
  "cors": "^2.8.5",
71
- "debug": "^4.3.2",
72
- "express": "^4.17.1",
75
+ "debug": "^4.3.3",
76
+ "express": "^4.17.2",
73
77
  "express-handlebars": "^5.3.4",
74
78
  "express-session": "^1.17.2",
75
79
  "extend": "^3.0.2",
@@ -85,15 +89,16 @@
85
89
  "ip-range-check": "0.2.0",
86
90
  "is-ip": "^3.1.0",
87
91
  "li": "^1.3.0",
88
- "mashlib": "^1.7.9",
89
- "mime-types": "^2.1.33",
92
+ "mashlib": "^1.7.16",
93
+ "mime-types": "^2.1.34",
90
94
  "negotiator": "^0.6.2",
91
95
  "node-fetch": "^2.6.6",
92
96
  "node-forge": "^0.10.0",
93
- "nodemailer": "^6.7.0",
97
+ "node-mailer": "^0.1.1",
98
+ "nodemailer": "^6.7.2",
94
99
  "oidc-op-express": "^0.0.3",
95
100
  "owasp-password-strength-test": "^1.3.0",
96
- "rdflib": "^2.2.10",
101
+ "rdflib": "^2.2.15",
97
102
  "recursive-readdir": "^2.2.2",
98
103
  "request": "^2.88.2",
99
104
  "rimraf": "^3.0.2",
@@ -118,14 +123,14 @@
118
123
  "eslint": "^7.32.0",
119
124
  "localstorage-memory": "1.0.3",
120
125
  "mocha": "9.1.3",
121
- "nock": "13.1.4",
126
+ "nock": "^13.2.1",
122
127
  "node-mocks-http": "1.11.0",
123
128
  "nyc": "15.1.0",
124
129
  "pre-commit": "1.2.2",
125
130
  "randombytes": "2.1.0",
126
131
  "sinon": "12.0.1",
127
132
  "sinon-chai": "3.7.0",
128
- "snyk": "1.752.0",
133
+ "snyk": "^1.809.0",
129
134
  "standard": "16.0.4",
130
135
  "supertest": "6.1.6",
131
136
  "turtle-validator": "1.1.1",
@@ -1,134 +0,0 @@
1
- <div class="row">
2
- <div class="col-md-6">
3
- <div class="panel panel-default">
4
- <div class="panel-body">
5
- <form method="post" action="/api/accounts/new" id="RegisterForm">
6
- {{> shared/error}}
7
-
8
- <div class="form-group">
9
- <label class="control-label" for="username">Username*</label>
10
- <input type="text" class="form-control" name="username" id="username" placeholder="alice"
11
- required value="{{username}}"/>
12
-
13
- {{#if multiuser}}
14
- <p>Your username should be a lower-case word with only
15
- letters a-z and numbers 0-9 and without periods.</p>
16
- <p>Your public Solid POD URL will be:
17
- <tt>https://<span class="editable-username">alice</span>.<script type="text/javascript">
18
- document.write(window.location.host)
19
- </script></tt></p>
20
- <p>Your public Solid WebID will be:
21
- <tt>https://<span class="editable-username">alice</span>.<script type="text/javascript">
22
- document.write(window.location.host)
23
- </script>/profile/card#me</tt></p>
24
-
25
- <p>Your <em>POD URL</em> is like the homepage for your Solid
26
- pod. By default, it is readable by the public, but you can
27
- always change that if you like by changing the access
28
- control.</p>
29
-
30
- <p>Your <em>Solid WebID</em> is your globally unique name
31
- that you can use to identify and authenticate yourself with
32
- other PODs across the world.</p>
33
- {{/if}}
34
-
35
- </div>
36
-
37
- <div class="form-group has-feedback">
38
- <label class="control-label" for="password">Password*</label>
39
- <input type="password" class="form-control control-progress{{#if disablePasswordStrengthCheck}} disable-password-strength-check{{/if}}" name="password" id="password" required/>
40
- <span class="glyphicon glyphicon-remove form-control-feedback hidden" aria-hidden="true"></span>
41
- <div class="progress">
42
- <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="4"></div>
43
- </div>
44
- <div class="help-block"></div>
45
- </div>
46
-
47
-
48
- <div class="form-group has-feedback">
49
- <label class="control-label" for="repeat_password">Repeat password*</label>
50
- <input type="password" class="form-control" name="repeat_password" id="repeat_password" required/>
51
- <span class="glyphicon glyphicon-remove form-control-feedback hidden"></span>
52
- </div>
53
-
54
-
55
- <div class="form-group">
56
- <label class="control-label" for="name">Name*</label>
57
- <input type="text" class="form-control" name="name" id="name" required value="{{name}}"/>
58
- </div>
59
-
60
- <div class="form-group">
61
- <label class="control-label" for="email">Email*</label>
62
- <input type="email" class="form-control" name="email" id="email" value="{{email}}"/>
63
- <span class="help-block">Your email will only be used for account recovery</span>
64
- </div>
65
-
66
- {{#if enforceToc}}
67
- {{#if tocUri}}
68
- <div class="checkbox">
69
- <label>
70
- <input type="checkbox" name="acceptToc" value="true" {{#if acceptToc}}checked{{/if}}>
71
- I agree to the <a href="{{tocUri}}" target="_blank">Terms &amp; Conditions</a> of this service
72
- </label>
73
- </div>
74
- {{/if}}
75
- {{/if}}
76
-
77
-
78
- <button type="submit" class="btn btn-primary" id="register">Register</button>
79
-
80
- <input type="hidden" name="returnToUrl" value="{{returnToUrl}}"/>
81
- {{> auth/auth-hidden-fields}}
82
-
83
- </form>
84
- </div>
85
- </div>
86
- </div>
87
-
88
- <!-- deprecated with inrupt/solid-client-auth
89
- <div class="col-md-6">
90
- <div class="panel panel-default panel-already-registered">
91
- <div class="panel-body">
92
- <h2>Already have an account?</h2>
93
- <p>
94
- <a class="btn btn-lg btn-success" href="{{{loginUrl}}}">
95
- Please Log In
96
- </a>
97
- </p>
98
- </div>
99
- </div>
100
- </div>
101
- --->
102
- </div>
103
-
104
- <script src="/common/js/owasp-password-strength-test.js" defer></script>
105
- <script src="/common/js/text-encoder-lite.min.js" defer></script>
106
- <script src="/common/js/solid.js" defer></script>
107
-
108
- <script>
109
- var username = document.getElementById('username');
110
- username.onkeyup = function() {
111
- var list = document.getElementsByClassName('editable-username');
112
- for (let item of list) {
113
- item.innerHTML = username.value.toLowerCase()
114
- }
115
- }
116
-
117
- window.addEventListener('DOMContentLoaded', function () {
118
- var connect = document.getElementById('ConnectExternalWebId')
119
- var container = document.getElementById('ExternalWebId')
120
- container.classList.toggle('hidden', !connect.checked)
121
- connect.addEventListener('change', function () {
122
- container.classList.toggle('hidden', !connect.checked)
123
- })
124
-
125
- var form = document.getElementById('RegisterForm')
126
- var externalWebIdField = document.getElementById('externalWebId')
127
- form.addEventListener('submit', function () {
128
- if (!connect.checked) {
129
- externalWebIdField.value = ''
130
- }
131
- })
132
- })
133
- </script>
134
-