]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
socialfy-your-domain made people think you needed manual interaction
authorMikael Nordfeldth <mmn@hethane.se>
Thu, 25 Feb 2016 11:32:33 +0000 (12:32 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Thu, 25 Feb 2016 19:12:56 +0000 (20:12 +0100)
I don't know why, but people started following those instructions for no
apparent reason and it ended up causing a bunch of federation issues or
homegrown cron script messes.

Maybe changing the name to "another" instead of "your" domain will make
people stop doing stuff randomly.

socialfy-another-domain/README.txt [new file with mode: 0644]
socialfy-another-domain/dot-well-known/host-meta [new file with mode: 0644]
socialfy-another-domain/dot-well-known/webfinger/example@example.com.xml [new file with mode: 0644]
socialfy-another-domain/dot-well-known/webfinger/index.php [new file with mode: 0644]
socialfy-your-domain/README.txt [deleted file]
socialfy-your-domain/dot-well-known/host-meta [deleted file]
socialfy-your-domain/dot-well-known/webfinger/example@example.com.xml [deleted file]
socialfy-your-domain/dot-well-known/webfinger/index.php [deleted file]

diff --git a/socialfy-another-domain/README.txt b/socialfy-another-domain/README.txt
new file mode 100644 (file)
index 0000000..7cb01ed
--- /dev/null
@@ -0,0 +1,56 @@
+Initial simple way to Webfinger enable your domain -- needs PHP.
+================================================================
+
+This guide needs some updating, since it will only guide you to present
+XML data (while the curl command likely gives you JSON). The workaround
+is to simply make curl get 'webfinger.xml' instead, and/or have another
+file that contains JSON, but that requires editing the PHP file as well.
+
+Step 1
+======
+
+Put the 'dot-well-known' on your website, so it loads at:
+
+     https://example.com/.well-known/
+
+(Remember the . at the beginning of this one, which is common practice
+for "hidden" files and why we have renamed it "dot-")
+
+Step 2
+======
+
+Edit the .well-known/host-meta file and replace "example.com" with the
+domain name you're hosting the .well-known directory on.
+
+Using vim you can do this as a quick method:
+    $ vim .well-known/host-meta [ENTER]
+    :%s/example.com/domain.com/    [ENTER]
+    :wq [ENTER]
+
+Step 3
+======
+
+For each user on your site, and this might only be you...
+
+In the webfinger directory, make a copy of the example@example.com.xml file
+so that it's called (replace username and example.com with appropriate
+values, the domain name should be the same as you're "socialifying"):
+
+     username@example.com.xml
+
+Then edit the file contents, replacing "social.example.com" with your
+GNU social instance's base path, and change the user ID number (and
+nickname for the FOAF link) to that of your account on your social
+site. If you don't know your user ID number, you can see this on your
+GNU social profile page by looking at the destination URLs in the
+Feeds links.
+
+PROTIP: You can get the bulk of the contents (note the <Subject> element though)
+        from curling down your real webfinger data:
+$ curl https://social.example.com/.well-known/webfinger?resource=acct:username@social.example.com
+
+Finally
+=======
+
+Using this method, though fiddly, you can now be @user@domain without
+the need for any prefixes for subdomains, etc.
diff --git a/socialfy-another-domain/dot-well-known/host-meta b/socialfy-another-domain/dot-well-known/host-meta
new file mode 100644 (file)
index 0000000..bba942f
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">  
+ <Link rel="lrdd" type="application/xrd+xml"
+        template="https://example.com/.well-known/webfinger?resource={uri}"/>
+</XRD>
diff --git a/socialfy-another-domain/dot-well-known/webfinger/example@example.com.xml b/socialfy-another-domain/dot-well-known/webfinger/example@example.com.xml
new file mode 100644 (file)
index 0000000..e95662b
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
+  <Subject>acct:username@example.com</Subject>
+  <Alias>acct:username@social.example.com</Alias>
+  <Alias>https://social.example.com/user/1</Alias>
+  <Link rel="http://webfinger.net/rel/profile-page"
+        type="text/html"
+       href="https://social.example.com/user/1"/>
+    
+  <Link rel="http://schemas.google.com/g/2010#updates-from"
+       type="application/atom+xml"
+       href="https://social.example.com/api/statuses/user_timeline/1.atom"/>
+    
+  <!-- Is this/was this ever supported?
+       <Link rel="http://microformats.org/profile/hcard"
+       type="text/html"
+       href="https://social.example.com/hcard"/> -->
+  
+  <Link rel="http://gmpg.org/xfn/11"
+       type="text/html"
+       href="https://social.example.com/user/1"/>
+    
+  <Link rel="describedby"
+       type="application/rdf+xml"
+       href="https://social.example.com/username/foaf"/>
+
+  <Link rel="http://salmon-protocol.org/ns/salmon-replies"
+       href="https://social.example.com/main/salmon/user/1"/>
+    
+  <Link rel="http://salmon-protocol.org/ns/salmon-mention"
+       href="https://social.example.com/main/salmon/user/1"/>
+    
+  <Link rel="http://ostatus.org/schema/1.0/subscribe"
+       template="https://social.example.com/main/ostatussub?profile={uri}"/>
+</XRD>
diff --git a/socialfy-another-domain/dot-well-known/webfinger/index.php b/socialfy-another-domain/dot-well-known/webfinger/index.php
new file mode 100644 (file)
index 0000000..91071bc
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+/*
+ * GNU social
+ * Copyright (C) 2010, Free Software Foundation, Inc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+// basename should make sure we can't escape this directory
+$u = basename($_GET['resource']);
+
+if (!strpos($u, '@')) {
+    throw new Exception('Bad resource');
+    exit(1);
+}
+
+if (mb_strpos($u, 'acct:')===0) {
+    $u = substr($u, 5);
+}
+
+// Just to be a little bit safer, you know, with all the unicode stuff going on
+$u = filter_var($u, FILTER_SANITIZE_EMAIL);
+
+$f = $u . ".xml";
+
+if (file_exists($f)) {
+  header('Content-Disposition: attachment; filename="'.urlencode($f).'"');
+  header('Content-type: application/xrd+xml');
+  echo file_get_contents($f);
+}
diff --git a/socialfy-your-domain/README.txt b/socialfy-your-domain/README.txt
deleted file mode 100644 (file)
index b7691ab..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-Initial simple way to Webfinger enable your domain -- needs PHP.
-================================================================
-
-Step 1
-======
-
-Put the 'dot-well-known' on your website, so it loads at:
-
-     https://example.com/.well-known/
-
-(Remember the . at the beginning of this one, which is common practice
-for "hidden" files and why we have renamed it "dot-")
-
-Step 2
-======
-
-Edit the .well-known/host-meta file and replace "example.com" with the
-domain name you're hosting the .well-known directory on.
-
-Using vim you can do this as a quick method:
-    $ vim .well-known/host-meta [ENTER]
-    :%s/example.com/domain.com/    [ENTER]
-    :wq [ENTER]
-
-Step 3
-======
-
-For each user on your site, and this might only be you...
-
-In the webfinger directory, make a copy of the example@example.com.xml file
-so that it's called (replace username and example.com with appropriate
-values, the domain name should be the same as you're "socialifying"):
-
-     username@example.com.xml
-
-Then edit the file contents, replacing "social.example.com" with your
-GNU social instance's base path, and change the user ID number (and
-nickname for the FOAF link) to that of your account on your social
-site. If you don't know your user ID number, you can see this on your
-GNU social profile page by looking at the destination URLs in the
-Feeds links.
-
-PROTIP: You can get the bulk of the contents (note the <Subject> element though)
-        from curling down your real webfinger data:
-$ curl https://social.example.com/.well-known/webfinger?resource=acct:username@social.example.com
-
-Finally
-=======
-
-Using this method, though fiddly, you can now be @user@domain without
-the need for any prefixes for subdomains, etc.
diff --git a/socialfy-your-domain/dot-well-known/host-meta b/socialfy-your-domain/dot-well-known/host-meta
deleted file mode 100644 (file)
index bba942f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0">  
- <Link rel="lrdd" type="application/xrd+xml"
-        template="https://example.com/.well-known/webfinger?resource={uri}"/>
-</XRD>
diff --git a/socialfy-your-domain/dot-well-known/webfinger/example@example.com.xml b/socialfy-your-domain/dot-well-known/webfinger/example@example.com.xml
deleted file mode 100644 (file)
index e95662b..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
-  <Subject>acct:username@example.com</Subject>
-  <Alias>acct:username@social.example.com</Alias>
-  <Alias>https://social.example.com/user/1</Alias>
-  <Link rel="http://webfinger.net/rel/profile-page"
-        type="text/html"
-       href="https://social.example.com/user/1"/>
-    
-  <Link rel="http://schemas.google.com/g/2010#updates-from"
-       type="application/atom+xml"
-       href="https://social.example.com/api/statuses/user_timeline/1.atom"/>
-    
-  <!-- Is this/was this ever supported?
-       <Link rel="http://microformats.org/profile/hcard"
-       type="text/html"
-       href="https://social.example.com/hcard"/> -->
-  
-  <Link rel="http://gmpg.org/xfn/11"
-       type="text/html"
-       href="https://social.example.com/user/1"/>
-    
-  <Link rel="describedby"
-       type="application/rdf+xml"
-       href="https://social.example.com/username/foaf"/>
-
-  <Link rel="http://salmon-protocol.org/ns/salmon-replies"
-       href="https://social.example.com/main/salmon/user/1"/>
-    
-  <Link rel="http://salmon-protocol.org/ns/salmon-mention"
-       href="https://social.example.com/main/salmon/user/1"/>
-    
-  <Link rel="http://ostatus.org/schema/1.0/subscribe"
-       template="https://social.example.com/main/ostatussub?profile={uri}"/>
-</XRD>
diff --git a/socialfy-your-domain/dot-well-known/webfinger/index.php b/socialfy-your-domain/dot-well-known/webfinger/index.php
deleted file mode 100644 (file)
index 91071bc..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-/*
- * GNU social
- * Copyright (C) 2010, Free Software Foundation, Inc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-// basename should make sure we can't escape this directory
-$u = basename($_GET['resource']);
-
-if (!strpos($u, '@')) {
-    throw new Exception('Bad resource');
-    exit(1);
-}
-
-if (mb_strpos($u, 'acct:')===0) {
-    $u = substr($u, 5);
-}
-
-// Just to be a little bit safer, you know, with all the unicode stuff going on
-$u = filter_var($u, FILTER_SANITIZE_EMAIL);
-
-$f = $u . ".xml";
-
-if (file_exists($f)) {
-  header('Content-Disposition: attachment; filename="'.urlencode($f).'"');
-  header('Content-type: application/xrd+xml');
-  echo file_get_contents($f);
-}