Open Bug 1851158 Opened 2 years ago Updated 2 years ago

iTIP handling attempts to handle missing methods but fails to actually use it

Categories

(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)

defect

Tracking

(Not tracked)

People

(Reporter: standard8, Unassigned)

Details

I was looking at calItipUtils.initItemFromMsgData and noticed a couple of issues.

xref: https://searchfox.org/comm-central/rev/b3390b38cb395f487554b77372e64b056cbc35b7/calendar/base/modules/utils/calItipUtils.sys.mjs#213-218,220

    if (imipMethod && imipMethod.length != 0 && imipMethod.toLowerCase() != "nomethod") {
      itipItem.receivedMethod = imipMethod.toUpperCase();
    } else {
      // There is no METHOD in the content-type header (spec violation).
      // Fall back to using the one from the itipItem's ICS.
      imipMethod = itipItem.receivedMethod;
    }
    lazy.cal.LOG("iTIP method: " + imipMethod);
...

The first is that after these references, imipMethod never gets referenced, so having the fallback won't actually do anything.

The second is that the logging will only work correctly in the fallback case.

I think this code was added ~15 years ago in bug 457203. So maybe the fallback isn't actually necessary and the logging isn't useful?

Agreed looks like that should be removed. imipMethod used to be passed to setupBar - https://hg.mozilla.org/comm-central/rev/f21bf34efae5#l34.91 but that looks like it happens elsewhere now. https://searchfox.org/comm-central/rev/4b6da981d18b0c219cecfa95c876adcafecca03a/mail/base/content/msgHdrView.js#554

You need to log in before you can comment on or make changes to this bug.