Wykres commitów

2376 Commity (main)

Autor SHA1 Wiadomość Data
Ryan Barrett 33436a35a1
webmention: de-dupe inboxes before delivering 2021-02-24 13:41:46 -08:00
Ryan Barrett 0532780eed
switch google-cloud-logging back to 1.x
...temporarily, until we figure out https://github.com/googleapis/python-logging/issues/110.
2020-12-31 08:35:25 -08:00
Ryan Barrett 9b15ca181f
webfinger bug fix
fixes https://console.cloud.google.com/errors/CKftxaDNhcunOQ
2020-12-30 19:24:22 -08:00
Ryan Barrett 7c7e2b1153
upgrade google-cloud-logging to 2.0 2020-12-30 10:39:07 -08:00
Ryan Barrett c12b675a7a
webfinger: handle acct:[domain]@fed.brid.gy requests
fixes #73
2020-12-30 10:26:48 -08:00
Ryan Barrett 21d60d51f4
circle: clear cache to work around grpcio build failure
https://app.circleci.com/pipelines/github/snarfed/bridgy-fed/20/workflows/3a23b2a8-cce6-41c3-aa13-f54b2c170672/jobs/274
2020-11-14 12:46:42 -08:00
Ryan Barrett eef94eb033
if ActivityPub inbox delivery fails, don't fall back to Salmon 2020-11-13 09:50:14 -08:00
Ryan Barrett 155be76bca
fix outbound AP headers and signature for Mastodon 3.2.1
https://github.com/snarfed/bridgy-fed/issues/68#issuecomment-720059695
2020-11-05 12:43:27 -08:00
Ryan Barrett 8af4571648
handle django-salmon port to pycryptodome
in snarfed/django-salmon@76f31ed25c
2020-10-31 13:23:36 -07:00
Ryan Barrett d22903c3a7
update AP signature generation for Mastodon 3.2.1 changes
not working yet. :( details in https://github.com/snarfed/bridgy-fed/issues/68#issuecomment-714752553
2020-10-29 16:08:48 -07:00
Ryan Barrett 76e7d2263f
circle: fix pip install grpcio breakage
example failure: https://app.circleci.com/pipelines/github/snarfed/oauth-dropins/90/workflows/2fb906b4-78f4-45d7-ad4d-46ed9d28b878/jobs/516

full error log:

```
Running setup.py install for grpcio ... error
  Complete output from command /root/project/local3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2x6fpemn/grpcio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-tmyhem3j/install-record.txt --single-version-externally-managed --compile --install-headers /root/project/local3/include/site/python3.7/grpcio:
  Cython-generated files are missing...
  We could not find Cython. Setup may take 10-20 minutes.
  WARNING: The wheel package is not available.
...
Traceback (most recent call last):
  File "/tmp/pip-install-mlr1xc5w/grpcio/src/python/grpcio/commands.py", line 264, in build_extensions
    build_ext.build_ext.build_extensions(self)
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
    self.build_extension(ext)
  File "/root/project/local3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 200, in build_extension
    if ext._needs_stub:
AttributeError: 'Extension' object has no attribute '_needs_stub'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-install-mlr1xc5w/grpcio/setup.py", line 465, in <module>
    cmdclass=COMMAND_CLASS,
  File "/root/project/local3/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/root/project/local3/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
  File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
    self.run_command('build')
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/root/project/local3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 78, in run
    _build_ext.run(self)
  File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/tmp/pip-install-mlr1xc5w/grpcio/src/python/grpcio/commands.py", line 267, in build_extensions
    support.diagnose_build_ext_error(self, error, formatted_exception)
  File "/tmp/pip-install-mlr1xc5w/grpcio/src/python/grpcio/support.py", line 118, in diagnose_build_ext_error
    diagnostic(build_ext, error)
  File "/tmp/pip-install-mlr1xc5w/grpcio/src/python/grpcio/support.py", line 98, in diagnose_attribute_error
    "We expect a missing `_needs_stub` attribute from older versions of "
commands.CommandError: We expect a missing `_needs_stub` attribute from older versions of setuptools. Consider upgrading setuptools.

----------------------------------------
Command "/root/project/local3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mlr1xc5w/grpcio/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-grvcioh0/install-record.txt --single-version-externally-managed --compile --install-headers /root/project/local3/include/site/python3.7/grpcio" failed with error code 1 in /tmp/pip-install-mlr1xc5w/grpcio/
```
2020-10-14 19:43:55 -07:00
Ryan Barrett dba533a14b
temporarily disable actually deleting Followers on AP Delete requests
mastodon.social sends Deletes for every Bridgy Fed account, all at basically the same time, and we have many Follower objects, so we have to do this table scan for each one, so the requests take a long time and end up spawning extra App Engine instances that we get billed for. and the Delete requests are almost never for followers we have. TODO: revisit this and do it right.
2020-10-11 08:35:14 -07:00
Ryan Barrett db75c0f555
add instructions for generating stats 2020-06-17 22:45:53 -07:00
Ryan Barrett 2c15820ef6
webmention => AP: handle multiple in-reply-to links
fixes #65. thanks again for reporting, @nekr0z!
2020-06-06 08:40:07 -07:00
Ryan Barrett 2a91f01393
webmention: handle missing Content-Type header
for https://console.cloud.google.com/errors/CNnflKqP5rHWvgE , https://console.cloud.google.com/errors/CPyMpaulkMKWZA
2020-05-20 23:36:11 -07:00
Ryan Barrett bddab29420
demote logging.error since it creates an error in StackDriver Error Reporting 2020-05-19 08:08:12 -07:00
Ryan Barrett 46067640b6
remove errant debug logging 2020-03-05 10:15:54 -08:00
Ryan Barrett d39562b849
add .7z, .zip, and .rar to TLD blocklist 2020-03-03 14:57:54 -08:00
Ryan Barrett 08cf7c1f8c
tell circle to use python 3.7
...since pycrypto doesn't support 3.8 :trollface:
2020-03-03 14:47:57 -08:00
Ryan Barrett 9eae3087fd
404 requests for root paths that aren't user domains
lots of these are fediverse tools sniffing for specific implentations, eg mastodon etc.  /siteinfo.json, /status.php, etc.
2020-03-02 10:50:43 -08:00
Ryan Barrett 9784686b1c
implement AP Delete of actors when their accounts are deleted
fixes #63
2020-02-29 20:28:53 -08:00
Ryan Barrett df6b0b58ba
unify request handler classes and handle_exception; move away from HOST[_URL]
fixes:
* https://console.cloud.google.com/errors/CN68rO-5sOK9cQ
* https://console.cloud.google.com/errors/CJWCu8b5_ureAg
* https://console.cloud.google.com/errors/CN6W4Zy7irzgOA
* https://console.cloud.google.com/errors/CN278MyjhZbtOQ
2020-01-31 14:40:11 -08:00
Ryan Barrett dfd5c37b9d
update appengine_config.HOST[_URL] to use appengine_info.DEBUG 2019-12-27 08:29:11 -08:00
Ryan Barrett ebc8aface6
readme: update dev setup instructions for python 3, etc 2019-12-26 21:14:05 -08:00
Ryan Barrett ee7b324525
bring back HOST_URL override to fed.brid.gy, for URLs emitted into AP 2019-12-26 18:18:44 -08:00
Ryan Barrett 2082dd7a85
salmon webfinger discovery bug fix: don't assume author detail in Atom
fixes https://console.cloud.google.com/errors/CLr8toqQo9yNSw
2019-12-26 14:42:58 -08:00
Ryan Barrett 3cdd58dfbf
python 3: replace a few errant unicodes with strs 2019-12-26 07:57:33 -08:00
Ryan Barrett 3771ff55df
add oauth_dropins like for static file handlers, gunicorn req't 2019-12-26 07:57:12 -08:00
Ryan Barrett 7d5b32a331
copy .gcloudignore from bridgy 2019-12-25 22:26:41 -08:00
Ryan Barrett 02d36b3b1f
migrate to the app engine standard python 3 runtime!
https://cloud.google.com/appengine/docs/standard/python3/python-differences
https://cloud.google.com/appengine/docs/standard/python/migrate-to-python3/
2019-12-25 22:26:26 -08:00
Ryan Barrett ab55c9d62c
ujson.dumps/loads() => util.json_dumps/loads() 2019-12-24 23:26:58 -08:00
Ryan Barrett 99a5c35ae3
switch from webutil.util.memcache_response to cache_response 2019-11-12 21:28:44 -08:00
Ryan Barrett 035050a7aa
add humanfriendly (new granary dependency) and appengine_config hack for it 2019-10-29 09:06:21 -07:00
Ryan Barrett faf676e8bb
switch from json to ultrajson for performance
https://github.com/esnme/ultrajson/
2019-10-29 07:06:15 -07:00
ImgBotApp eade579cb6 [ImgBot] Optimize images
*Total -- 343.21kb -> 290.41kb (15.38%)

/static/activitypub_logo.svg -- 8.83kb -> 4.12kb (53.36%)
/static/mastodon_logotype_blue.png -- 13.76kb -> 8.26kb (39.95%)
/static/mastodon_logotype_dark.png -- 11.97kb -> 8.06kb (32.68%)
/static/activitypub_logotype.svg -- 18.42kb -> 13.18kb (28.45%)
/static/mastodon_logotype_white.png -- 12.51kb -> 9.35kb (25.24%)
/static/mastodon_logo.png -- 14.49kb -> 10.86kb (25.1%)
/static/hubzilla_logo.png -- 6.84kb -> 5.48kb (19.83%)
/static/ostatus_globe.jpg -- 54.49kb -> 48.52kb (10.94%)
/static/bridgy_logo.jpg -- 80.53kb -> 71.83kb (10.8%)
/static/bridgy_fed_logo.jpg -- 96.55kb -> 86.31kb (10.61%)
/static/ostatus_logo.png -- 5.18kb -> 5.04kb (2.81%)
/static/hubzilla_logotype.png -- 12.71kb -> 12.49kb (1.73%)
/static/mastodon_logo.svg -- 1.36kb -> 1.35kb (0.86%)
/static/mastodon_logotype_white.svg -- 5.57kb -> 5.56kb (0.19%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2019-10-16 11:48:05 -07:00
Ryan Barrett 68d86fce8f
move pip install -e's for oauth-dropins and granary into req't.freeze.txt 2019-10-06 07:35:08 -07:00
Ryan Barrett f5a893f2e5
update dependency versions
corresponds to snarfed/granary@d0c397b8d9 and snarfed/oauth-dropins@4e2b32531b
2019-10-05 23:04:53 -07:00
Ryan Barrett 7c9a03c827
unify HTTP fetching, HTML and mf2 parsing, and error handling into webutil
see:
* snarfed/granary#171
* snarfed/webutil@f994884b2b
* snarfed/oauth-dropins@f5b6e73530
* snarfed/granary@284eb11508
2019-10-03 21:08:26 -07:00
Ryan Barrett 00d0cc5557
fully qualify relative Atom feed URLs before fetching
fixes #58. thanks again for reporting @fluffy-critter!
2019-09-23 11:20:11 -07:00
Ryan Barrett c623a295c6
misc noop cleanups based on LGTM alerts
https://lgtm.com/projects/g/snarfed/bridgy/?mode=list
2019-09-19 11:57:16 -07:00
Ryan Barrett 7617d4893e
update test to match granary new whitespace handling
...again. specifically snarfed/granary@0ac54362ae
2019-09-19 11:56:29 -07:00
Ryan Barrett 9ff0a28dd3
minor bug fix in AP Undo Follow error handling 2019-08-14 11:16:37 -07:00
Ryan Barrett ef8b9b13cc
bug fix in webmention => activitypub target fetch error handling
fixes https://console.cloud.google.com/errors/CPyMpaulkMKWZA
2019-08-13 16:23:47 -07:00
Ryan Barrett 27b643355f
make coveralls optional in circle, ie if it fails, don't fail the whole build 2019-08-13 16:15:04 -07:00
Ryan Barrett 879f6d1752
return 400 on more bad inputs, eg webmention source URLs 2019-08-13 13:29:31 -07:00
Ryan Barrett 65044b081c
accept Undo of Follow even if Follower doesn't exist 2019-08-01 10:39:15 -07:00
Ryan Barrett f02c212f37
AP delivery: skip inactive followers 2019-08-01 10:36:39 -07:00
Ryan Barrett 4b70a89046
handle AP Undo of Follow
needed for eg mastodon when you unfollow and then try to refollow someone. on unfollow, mastodon sends an Undo, and waits for a 200 before it shows success and will let you refollow.
2019-08-01 10:32:50 -07:00
Ryan Barrett ad55cc95f3
update a handful of deps: requests, urllib3, jinja, etc. 2019-07-24 13:29:40 -07:00
Ryan Barrett dd0a0d964b
don't assert on posts without u-id or u-url
fixes https://console.cloud.google.com/errors/CNLV_6K-gtPJDw
2019-07-24 13:03:15 -07:00