cuny-academic-commons / bp-event-organiser

Allows Event Organiser plugin events to be assigned to BuddyPress groups and generates a group calendar page for each group
GNU General Public License v2.0
3 stars 1 forks source link

In group, ical mode can be triggered incorrectly #70

Closed boonebgorges closed 4 years ago

boonebgorges commented 4 years ago

In _display_hook() of BP_Event_Organiser_Group_Extension, there's a check to see whether the current action_variable() is ctype_xdigit: https://github.com/cuny-academic-commons/bp-event-organiser/blob/f2cdb7b745b7a99c347d2e52ea0fd088afad6432/bp-event-organiser-groups.php#L233

This conditional can be inappropriately triggered when the post slug for an event has only [a-f0-9] characters in it. I came across this because of an event with the name abcde :-D

I'm unsure how the hexadecimal check is related to ical without digging deeper. @r-a-y maybe you could have a look to see if there's a quick fix?

r-a-y commented 4 years ago

The ctype_xdigit() check is done for private iCalendar hashes.

I guess I can also do a check for length as well so short strings like abcde will not match :) Will look into it.

r-a-y commented 4 years ago

@boonebgorges - Commit 008419a should fix this. I added it to 1.1.x branch.

Is the next release 1.2.0? If so, I'll create a new 1.2.x branch.

boonebgorges commented 4 years ago

I don't think there's any need to match the CBOX numbering. But in this case, I think that the new event-import feature suggests that a "major" version is appropriate, which just happens to be 1.2.x. So yes, I guess so :-D

r-a-y commented 4 years ago

Closing as this is part of the 1.2.0 release.