question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ORGANIZDR's SENT-BY not handled as per specification

See original GitHub issue

If a participant is sending an update of a meeting invite, on behalf of the organizer, then that participant’s email needs to be put as shown below.

ORGANIZER;SENT-BY=“mailto:sray@example.com”:mailto:jsmith@example.com (from https://tools.ietf.org/html/rfc5545#section-3.1.18)

Unfortunately,

  1. The double quotes and the mailto: are not getting added, if only email is set using Organizer.setSentBy().
  2. If we add the escaped double quotes and mailto (like this -> “\“mailto:participant@domain.com\””), then it would be rejected with the below IllegalArgumentException.
java.lang.IllegalArgumentException: Property "ORGANIZER" has a parameter named "SENT-BY" whose value contains one or more invalid characters.  The following characters are not permitted: [ \n \r " ]
	at com.github.mangstadt.vinnie.io.VObjectWriter.validate(VObjectWriter.java:617)
	at com.github.mangstadt.vinnie.io.VObjectWriter.writeProperty(VObjectWriter.java:465)
	at biweekly.io.text.ICalWriter.writeProperty(ICalWriter.java:327)
	at biweekly.io.text.ICalWriter.writeComponent(ICalWriter.java:250)
	at biweekly.io.text.ICalWriter.writeComponent(ICalWriter.java:266)
	at biweekly.io.text.ICalWriter._write(ICalWriter.java:212)
	at biweekly.io.StreamWriter.write(StreamWriter.java:83)
	at biweekly.io.chain.ChainingTextWriter.go(ChainingTextWriter.java:211)
	at biweekly.io.chain.ChainingTextWriter.go(ChainingTextWriter.java:187)
	at biweekly.io.chain.ChainingTextWriter.go(ChainingTextWriter.java:138)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mangstadtcommented, Feb 10, 2020

The Javadocs for the setSentBy method do mention that it should be a mailto URI. I wonder why I didn’t make this required—the RFC states that it MUST be a mailto URI.

Javadocs:

@param uri a URI representing the person (typically, an email URI, e.g "mailto:janedoe@example.com") or null to remove

From RFC5545 p.27:

Description: This parameter can be specified on properties with a CAL-ADDRESS value type. The parameter specifies the calendar user that is acting on behalf of the calendar user specified by the property. The parameter value MUST be a mailto URI as defined in [RFC2368]. The individual calendar address parameter values MUST each be specified in a quoted-string.

1reaction
girishadatcommented, Feb 10, 2020

Adding this comment for reference by anyone who may face the same problem later.

The INCORRECT way of setting SENT-BY for Organizer:

Organizer organizer = new Organizer(null, "jsmith@example.com");
organizer.setSentBy("sray@example.com");
event.setOrganizer(organizer);

The result would be like this:

ORGANIZER;SENT-BY=sray@example.com:mailto:jsmith@example.com

The CORRECT way:

Organizer organizer = new Organizer(null, "jsmith@example.com");
organizer.setSentBy("mailto:sray@example.com");
event.setOrganizer(organizer);

The result would be like this:

ORGANIZER;SENT-BY=“mailto:sray@example.com”:mailto:jsmith@example.com

(Most probably this could be an issue for the DELEGATED-TO, DELEGATED-FROM, and MEMBER parameters of ATTENDEE as well)

Maybe it would be good to mention this somewhere in the right place in documentation. Though this may be a little less intuitive, it is unsafe to change or optimize this behavior as it may impact those who already have this in their code that uses biweekly library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Specifications | SHERIFF'S EMERGENCY SERVICES ...
A Per Diem Communications Dispatcher I is responsible for handling emergency and non-emergency telephone communications, respond to database ...
Read more >
2 CFR Part 200 -- Uniform Administrative Requirements, Cost ...
(2) For purpose of this part, capital assets do not include intangible right-to-use assets (per GASB) and right-to-use operating lease assets (per FASB)....
Read more >
Notice to Bidders, Specifications and Proposal - Illinois.gov
INSTRUCTIONS TO BIDDERS. (a) This Notice, the invitation for bids, proposal and letter of award shall, together with all other documents in accordance...
Read more >
Scheduling Extensions to CalDAV RFC 6638 - IETF Datatracker
This specification defines a client/server scheduling protocol, ... Significant issues with incompatible CalDAV implementations are not anticipated. 1.1.
Read more >
Publication 557 (01/2022), Tax-Exempt Status for Your ... - IRS
PEOs handle various payroll administration and tax reporting ... It can charge no more for the copies than the per page rate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found