nextcloud / social

🎉 Social can be used for work, or to connect to the fediverse!
https://apps.nextcloud.com/apps/social
GNU Affero General Public License v3.0
488 stars 59 forks source link

Some clarification needed before this title can be appropriate #615

Open Rixon-gh opened 5 years ago

Rixon-gh commented 5 years ago

Describe the bug I have a redirect from mydomain.tld to cloud.mydomain.tld. Social was installed while it still thought the base was 127.0.0.1, so I did a bit of reading here and found out about occ social:reset and used it to change to cloud.mydomain.tld.

I clicked to follow @nextcloud@mastodon.xyz, and then it dawned on me that I could use the redirect already in place to have a nicer handle of @myuser@mydomain.tld without the cloud. part, so I used occ social:reset once more and then it dawned on me that I probably should have unfollowed @nextcloud@mastodon.xyz first.

My Apache logs show that some fediverse crawlers are getting 302 Found from the redirect which I presume is OK but the hits for POST /apps/social/inbox from mastodon.xyz seem to be getting 500 Internal Server Error - I can't tell from the apache logs if it's the new follow or the old follow that is giving 500 to mastodon because the url doesn't contain a fediverse ID and the POST data is not in the log - just "POST /apps/social/inbox HTTP/1.1" 500. The Nextcloud logs do complain about a signiature that can't be checked, so does this suggest it's signed for my old domain format fediverse ID? Nextcloud log is as follows (numerous identical entries):

[no app in context] Warning: 500 - {"status":-1,"exception":"OCA\\Social\\Exceptions\\SignatureException","message":"signature cannot be checked"}

POST /apps/social/inbox
from 163.172.251.107 at 2019-07-08T14:27:27+00:00

Quick related question: certbot seems to favour putting in a rewrite rule to go from :80 to ssl:443 without any regard for the Redirect directive my Apache vhost was already using... what's best for nextcloud/social? Does it make a difference? I currently have:

<VirtualHost *:80>
  DocumentRoot  /var/www/nextcloud
  ServerName    cloud.mydomain.tld
  ServerAlias   localLanHostname mydomain.tld
  Redirect      301     /       https://cloud.mydomain.tld/
[...]
</VirtualHost>

<IfModule mod_ssl.c>
  <VirtualHost _default_:443>
    DocumentRoot        /var/www/nextcloud
    ServerName          cloud.mydomain.tld
    ServerAlias         localLanHostname mydomain.tld

To Reproduce Steps to reproduce the behavior: Not entirely sure which of the two following things caused the problem

Just typing this out is making me realise these are most likely separate issues. Let me know if I should split them.

Expected behavior No 500 Internal Server Error log entries or Nextcloud Logging entries for SigniatureException

Screenshots If applicable, add screenshots to help explain your problem. N.A/Unnecessary

Client details:

Server details **Social app version:** 0.2.6 **Operating system**: Debian **Web server:** apache2 **Database:** mariadb **PHP version:** 7.2 **Nextcloud version:** (see Nextcloud admin page) 16.0.1
Logs #### Nextcloud log (data/nextcloud.log) *as above in description* #### Browser log N.A/Unrelated
Rixon-gh commented 5 years ago

Will edit title when I know if it's the redirect or the 'forgot-to-unfollow-before-changing-base-and-following-again'