Calendar: URL violates local access rules (NC 15.0.7 Calendar 1.6.5 "german")

Created on 12 May 2019  Â·  4Comments  Â·  Source: nextcloud/calendar

Steps to reproduce

  1. click "neues Abonnement" (new subscription)
  2. Type in https://fcal.ch/privat/fcal_holidays.ics.php?hl=de&klasse=4&geo=3073

Expected behaviour

the subscipted calendar should appear

Actual behaviour

Error mesage: "URL violates local access rules"

Server configuration

  • NC 15.0.7
  • Calendar 1.6.5
  • german locale

How to fix

change in proxycontroller.php
preg_match('/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/', $host)) {

to

preg_match('/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD][0-9a-fA-F][0-9a-fA-F]:)/', $host)) {

3 - to review bug

Most helpful comment

@lorenalexm @ChadOhman In case you want to allow access to the local network, you have to set
php occ config:app:set dav webcalAllowLocalAccess --value yes

All 4 comments

Can confirm that this is present with English locale as well, though using an internal address instead of a properly mapped domain. Time has not allowed testing the preposed fix.

URL: http://192.168.3.54:7878/feed/calendar/Radarr.ics?apikey={redacted}
Error: "URL violates local access rules"

I'm also seeing this issue.

http://10.0.0.21:9283/api/calendar/ical?secret=yHagsNfCTQPyguodNxS************************
Error: "URL violates local access rules"

@lorenalexm @ChadOhman In case you want to allow access to the local network, you have to set
php occ config:app:set dav webcalAllowLocalAccess --value yes

Hitting same issue when trying to add https://fcal.ch/privat/fcal_holidays.ics.php?hl=fr&klasse=4&geo=1066. Your workaround works @gschenck, thank you!

Was this page helpful?
0 / 5 - 0 ratings