Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use webcals URI scheme when accessing via HTTPS (PFS directive) #748

Closed
Somebodyisnobody opened this issue Mar 1, 2018 · 15 comments
Closed
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature request good first issue Small tasks with clear documentation about how and in which place you need to fix things in. Hacktoberfest
Milestone

Comments

@Somebodyisnobody
Copy link

Somebodyisnobody commented Mar 1, 2018

Steps to reproduce

  1. Create and share a calendar
  2. Open shared calendar
  3. Click right on "subscribe" to copy the link of the button and paste it somewhere to take a look on it.

Expected behaviour

Nextcloud applies PFS to the webcal-link and forms it into an webcals-link

Actual behaviour

If i access via TLS the subscribtion link is still webcal://

I cannot find an offical URI scheme but all of my clients does support the webcals://-sheme
Some examples:

  • CalDAV for Android
  • WebcalSync
  • Thunderbird (acc. to serverlog)
  • Outlook (acc. to serverlog)

@georgehrke said in nextcloud/server#8039 (comment)

What the calendar app does for webcal is the following: try https, if that fails, fall back to http. And that's pretty much what I expect from any other webcal client.

I tested that with Outlook:
My server is running on TLS at port 444 (DNAT because of internal routes), so my scheme is webcals://my.domain:444/remote.php/dav/.....

  • If i enter webcal://my.domain:444/remote.php/dav/..... Outlook just does nothing, webserver logs "400 (Bad request)"
  • If i enter the webcals:// version Outlook wizard continues.

So in fact what Georg expects from other webcal clients isn't what other developers think... 😯 😞
Considering the unofficial support of "webcals://" and the Outlook-test it would be appropriate to apply PFS accordingly and use webcals:// when accessing via HTTPS.

Server configuration

Web server: nginx

Database: mysql

PHP version: 7.2

Server version: 13

Calendar version: 1.6.0

Updated from an older installed version or fresh install: updated

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: newest FF

CalDAV-clients: Thunderbird, WebcalSync, CalDAV and infrequently Outlook


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@georgehrke
Copy link
Member

PFS = Perfect forward secrecy?

@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of enhancement New feature request labels Mar 1, 2018
@georgehrke georgehrke added this to the 1.6.3 milestone Mar 1, 2018
@georgehrke georgehrke added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Mar 1, 2018
@georgehrke
Copy link
Member

  • but that also means that we have to support webcals ourselves

@Somebodyisnobody
Copy link
Author

#748 (comment)

Yeah i meant Perfect forward secrecy.

@arunikayadav42
Copy link

Can I please get started with working on this issue?

@Somebodyisnobody
Copy link
Author

Sorry for the stupid question but what are you waiting for (or who's asked)?

@arunikayadav42
Copy link

could you please help me get started with the same please :)

@Somebodyisnobody
Copy link
Author

how could I help you? I can partially read PHP but otherwise I'm more of a logic person.
How can we both work on a snippet of code?

@arunikayadav42
Copy link

Like please tell me what file contains the bug :)

@georgehrke
Copy link
Member

georgehrke commented Mar 12, 2018

You can just search the code for webcal://. That should lead you to the correct file.

I‘m not sure whether this issue is in a php or a JavaScript file.

@Somebodyisnobody
Copy link
Author

Somebodyisnobody commented Mar 12, 2018

Ok i searched in the rep for "webcal" and in my browser for "webcal://"
Seems that calendar/js/app/utility/webcalUtility.js is just for importing calendars into nextcloud. It replaces webcal:// to https:// like @georgehrke said.

But i found something by searching for "subscribe" that is written in php:

<div id="header-right" class="header-right">
<a href="<?php p($_['webcalURL']); ?>" id="download" class="button">
<span class="icon icon-public"></span>
<span id="download-text"><?php p($l->t('Subscribe'))?></span>

<?php p($_['webcalURL']); ?>" is interesting. Again, i could be wrong, i am not a programmer!

Maybe this is an approach for you.

@arunikayadav42
Copy link

cool @Somebodyisnobody I will look into it :)

@Somebodyisnobody
Copy link
Author

@arunikayadav42 do you have news for us?

@Somebodyisnobody
Copy link
Author

"webcalURL" is defined in

$webcalUrl = 'webcal://' . substr($downloadUrl, $protocolLength);

@arunikayadav42
Copy link

I am still looking into the same.Need two more days please due to some technical glitches :)

@georgehrke georgehrke modified the milestones: 1.6.3, 2.0.0 beta3 Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature request good first issue Small tasks with clear documentation about how and in which place you need to fix things in. Hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants