Browse Source

Fixup XRD stuff

* Keep the 'secret' secret by putting it in a gitignored config file.
* Delete XML files using known secret
* well-known should use HTTPS to point to XRD
Chimo 3 years ago
parent
commit
e393626f14

+ 2
- 0
.gitignore View File

@@ -8,3 +8,5 @@ node_modules
8 8
 .sass-cache
9 9
 .jekyll-metadata
10 10
 /composer
11
+/xrd/*.xml
12
+

BIN
.well-known/.host-meta.un~ View File


+ 1
- 1
.well-known/host-meta View File

@@ -1,7 +1,7 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">
3 3
     <hm:Host>chromic.org</hm:Host>
4
-    <Link rel="lrdd" template="http://chromic.org/xrd/?uri=acct%3A{uri}">
4
+    <Link rel="lrdd" template="https://chromic.org/xrd/?uri=acct%3A{uri}">
5 5
         <Title>WebFinger resource descriptor</Title>
6 6
     </Link>
7 7
 </XRD>

BIN
xrd/.5Oz2jrBTOskPs6KXAl7jchimo@chromic.org.xml.un~ View File


+ 0
- 14
xrd/5Oz2jrBTOskPs6KXAl7jchimo@chromic.org.xml View File

@@ -1,14 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
3
-  <Subject>acct:chimo@chromic.org</Subject>
4
-  <Alias>acct:chimo@sn.chromic.org</Alias>
5
-  <Alias>http://sn.chromic.org/user/1</Alias>
6
-  <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://sn.chromic.org/user/1"/>
7
-  <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http://sn.chromic.org/api/statuses/user_timeline/1.atom"/>
8
-  <Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://sn.chromic.org/user/1"/>
9
-  <Link rel="http://gmpg.org/xfn/11" type="text/html" href="http://sn.chromic.org/user/1"/>
10
-  <Link rel="describedby" type="application/rdf+xml" href="http://sn.chromic.org/foaf"/>
11
-  <Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://sn.chromic.org/main/salmon/user/1"/>
12
-  <Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://sn.chromic.org/main/salmon/user/1"/>
13
-  <Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://sn.chromic.org/main/ostatussub?profile={uri}"/>
14
-</XRD>

+ 2
- 24
xrd/index.php View File

@@ -1,27 +1,8 @@
1 1
 <?php
2 2
 
3
-/*
4
- * GNU social
5
- * Copyright (C) 2010, Free Software Foundation, Inc
6
- *
7
- * This program is free software: you can redistribute it and/or modify
8
- * it under the terms of the GNU Affero General Public License as published by
9
- * the Free Software Foundation, either version 3 of the License, or
10
- * (at your option) any later version.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- * GNU Affero General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Affero General Public License
18
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
- */
3
+require_once('../../private/_config.php');
20 4
 
21
-
22
-$s = "5Oz2jrBTOskPs6KXAl7j";
23
-
24
-/* this should be a secret */
5
+$s = $config['xrd']['secret'];
25 6
 
26 7
 $u = $_GET['uri'];
27 8
 
@@ -36,6 +17,3 @@ if (file_exists($f)) {
36 17
   header('Content-type: text/xml');
37 18
   echo $c;
38 19
 }
39
-
40
-
41
-?>

Loading…
Cancel
Save