Commit Graph

18359 Commits

Author SHA1 Message Date
Mikael Nordfeldth
1517deeeb6 Since ActivityContext::CONVERSATION changed to 'conversation' instead of 'ostatus:conversation' we need to add it ourselves
the xmlstringerthinger doesn't really use namespaces afaik
2017-05-06 15:27:25 +02:00
Mikael Nordfeldth
0dd68d11cb What just happened? Not sure if me or git caused duplicate code. 2017-05-06 14:48:04 +02:00
Mikael Nordfeldth
4f37c564a5 Merge branch 'master' into mmn_fixes 2017-05-06 14:40:06 +02:00
Mikael Nordfeldth
5ad2f2873e ...and make sure we checkschema on Notice_prefs on upgrade... 2017-05-06 14:38:50 +02:00
Mikael Nordfeldth
966971bd12 Revert some of 8a4bec811b
use Notice_prefs instead of adding a new field. The rationale here
is simply that the Notice table was _huge_ and I rant into issues
with /tmp filling up when altering the tables. So let's just create
a new table instead.
2017-05-06 14:38:48 +02:00
Mikael Nordfeldth
7767c57087 Notice_prefs now available (I just copied Profile_prefs) 2017-05-06 14:38:47 +02:00
Mikael Nordfeldth
ba4a84602a Output proper HTML and XML headers for single Atom entry
RFC5023 <https://tools.ietf.org/html/rfc5023> specifies that the
content type parameter 'type=entry' should be used to clarify data.
2017-05-06 14:38:46 +02:00
Mikael Nordfeldth
d115f9dd1b Output selfLink from notice asActivity[Object] 2017-05-06 14:38:45 +02:00
Mikael Nordfeldth
1ccb934541 Return false immediately if $url is empty for common_valid_http_url 2017-05-06 14:38:43 +02:00
Mikael Nordfeldth
434956fc75 Notices start saving selfLink from activities/objects 2017-05-06 14:38:42 +02:00
Mikael Nordfeldth
7da925ca70 Handle selfLink in ActivityObject 2017-05-06 14:38:41 +02:00
Mikael Nordfeldth
3a7d8efc57 ...and make sure we checkschema on Notice_prefs on upgrade... 2017-05-06 13:54:42 +02:00
Mikael Nordfeldth
286b1e0ab7 Revert some of 8a4bec811b
use Notice_prefs instead of adding a new field. The rationale here
is simply that the Notice table was _huge_ and I rant into issues
with /tmp filling up when altering the tables. So let's just create
a new table instead.
2017-05-06 13:24:11 +02:00
Mikael Nordfeldth
2cbef2b10f Notice_prefs now available (I just copied Profile_prefs) 2017-05-06 13:22:10 +02:00
Mikael Nordfeldth
d88e9ffd33 Output proper HTML and XML headers for single Atom entry
RFC5023 <https://tools.ietf.org/html/rfc5023> specifies that the
content type parameter 'type=entry' should be used to clarify data.
2017-05-06 12:38:34 +02:00
Mikael Nordfeldth
7c829852b8 Output selfLink from notice asActivity[Object] 2017-05-06 12:26:54 +02:00
Mikael Nordfeldth
709f1bbd75 Return false immediately if $url is empty for common_valid_http_url 2017-05-06 12:25:27 +02:00
Mikael Nordfeldth
8a4bec811b Notices start saving selfLink from activities/objects 2017-05-06 12:15:54 +02:00
Mikael Nordfeldth
7889b21e7b Handle selfLink in ActivityObject 2017-05-06 11:57:16 +02:00
Mikael Nordfeldth
000af6d9ee default to #addtag on !group mention 2017-05-02 21:21:53 +02:00
Mikael Nordfeldth
07458e5375 Fixed the parsing of ostatus:conversation etc.
Conversation will now start storing remote URL

The namespace features don't work the way they were written for here
so I fixed that, making the ostatus: namespace properly looked up and
then the homegrown getLink function looks for what is back-compat with
StatusNet etc. if I remember correctly.
2017-05-02 18:58:22 +02:00
Mikael Nordfeldth
e8eb9f9614 Less raw database dumps in debug please 2017-05-02 09:18:43 +02:00
Mikael Nordfeldth
e9ab06b59e Fix issues with non-subscribed Ostatus_profiles 2017-05-02 09:14:30 +02:00
Mikael Nordfeldth
979c525124 I like to throw exceptions instead of using if statements. 2017-05-02 09:07:39 +02:00
Mikael Nordfeldth
06b25f384a File_redirection->getFile could never get the file anyway if $redir->file_id was empty... 2017-05-02 09:07:00 +02:00
Mikael Nordfeldth
5af5bb2a32 Show WebSub state on remote user profiles 2017-05-01 21:18:04 +02:00
Mikael Nordfeldth
caa5fb75b3 Introduce neat function getFeedSub() on Ostatus_profile 2017-05-01 21:17:22 +02:00
Mikael Nordfeldth
f4d6710a0f Change mentions of PuSH to WebSub
WebSub is probably finalised before we make a release anyway. Here is
the official spec: https://www.w3.org/TR/websub/

Mostly just comments that have been changed. Some references to PuSH <0.4
are left because they actually refer to PuSH 0.3 and that's not WebSub...

The only actual code change that might affect anything is FeedSub->isPuSH()
but the only official plugin using that call was FeedPoller anyway...
2017-05-01 11:04:27 +02:00
Mikael Nordfeldth
b3da5bdaa3 Debugging log fix. 2017-05-01 10:36:55 +02:00
Mikael Nordfeldth
f6d4d00e02 I think this will stop my daemons from endlessly looping
I got this which ate all my memory:

queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing - 200 OK
queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing
queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing - 200 OK
queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers.
queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML.
queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook - 200 OK
queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook
queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook - 200 OK
queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers.
queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML.
queuedaemon.php:10733] HTTPClient: HTTP HEAD https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook - 200 OK
queuedaemon.php:10733] Checking for remote URL metadata for https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook
queuedaemon.php:10733] HTTPClient: HTTP GET https://drive.google.com/file/d/*masked*/view?usp=sharing&usp=embed_facebook&usp=embed_facebook - 200 OK
queuedaemon.php:10733] Trying to discover an oEmbed endpoint using link headers.
queuedaemon.php:10733] Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML.
...ad nauseam.
2017-05-01 10:27:21 +02:00
Mikael Nordfeldth
37c97ac8fc Message to end-user on why FeedSub failed. 2017-05-01 07:40:16 +02:00
Mikael Nordfeldth
5ac20a4d30 Clearing cache showed my layout fail! 2017-05-01 07:39:56 +02:00
Mikael Nordfeldth
45203a4992 Makes the attachment button stay within the form area... 2017-04-30 20:32:10 +02:00
Mikael Nordfeldth
bb72229d6a Show what you're replying to in the web interface 2017-04-30 10:37:21 +02:00
Mikael Nordfeldth
16880de8f6 ensureHub on 422 status code (Superfeedr error on non-existing topic) 2017-04-30 10:29:16 +02:00
Mikael Nordfeldth
b20b9727cf More debugging info for FeedSub PuSH self-healing 2017-04-30 09:46:15 +02:00
Mikael Nordfeldth
e21043e81c syntax fix (throw _new_ *Exception) 2017-04-30 09:33:06 +02:00
Mikael Nordfeldth
1ecf709918 Make sure we don't receiveFeed() in the case of that exception 2017-04-30 09:31:16 +02:00
Mikael Nordfeldth
5288a6f9e2 Update huburi for FeedSub if PuSH signature is invalid
This because some remote server might have used third party PuSH hubs
but switch and we don't know about it.

Possible risks here are of course MITM that could force us to rediscover
PuSH hubs from a feed they control, but that currently feels ... meh.
2017-04-30 09:20:08 +02:00
Mikael Nordfeldth
c505652c15 Confirm_address::getByAddress not getAddress
Also fixed the error handling to match the function call.
2017-04-29 14:48:46 +02:00
Takuma YOSHIOKA
2ebdac70da
Ignore whole directory, not only inner contents
`dir/*` style let git ignore files and directories in `dir/`, but not
`dir/` itself.
This cause `git clean -df` to remove `dir/` **with its contents**!

To prevent `git clean -df` to remove data directories (`avatar/`, `file/`,
etc), use `dir/` (or `dir`) style in gitignore.
2017-04-29 14:22:36 +09:00
Mikael Nordfeldth
853b016a42 Separate ensureHub into function in FeedSub 2017-04-27 09:24:12 +02:00
Mikael Nordfeldth
598b51eb7a Escaping a URI in common_debug call 2017-04-27 09:23:45 +02:00
Mikael Nordfeldth
985f3b44b7 LRDD blacklisted URL test 2017-04-26 23:24:42 +02:00
Mikael Nordfeldth
ea6d8b8bde LRDD blacklisted URL test 2017-04-26 23:21:13 +02:00
Mikael Nordfeldth
e1df763940 Test URLs against blacklist also on PuSH subscriptions. 2017-04-26 22:43:16 +02:00
Mikael Nordfeldth
bb76af4f65 Test URLs against blacklist also on PuSH subscriptions. 2017-04-26 22:41:59 +02:00
Mikael Nordfeldth
839b3e7392 allowed_schemes was misspelled 2017-04-26 22:12:06 +02:00
Mikael Nordfeldth
adfd76f44b allowed_schemes was misspelled 2017-04-26 22:11:28 +02:00
Mikael Nordfeldth
df7ff4ef1a Moving form to its own file as we do nowadays 2017-04-25 21:13:29 +02:00