I am trying to make Smart Date work with FullCalendar View. Currently I am trying to make the drag and resize features of FullCalendar work with Smart Date (#3117690: Provide drag and resize editing support for Fullcalendar View).

Therefore I am extending from CalendarEventController. To make this work succesfully I would need to access the $csrftoken member property in the extended class. But this property is set to "private".

Would it be possible to change this to "protected"?

For reference: I am seeing a few places in Drupal core where csrftoken is used and none of that places seems to use "private" on the member. For example: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...

So it seems that "protected" access is somewhat standard here and should not impose a security problem here.

I am providing a small patch for this.

Comments

stefan.korn created an issue. See original summary.

stefan.korn’s picture

Assigned: stefan.korn » Unassigned
Status: Active » Needs review
StatusFileSize
new454 bytes
mingsong’s picture

Hi Stefan,

Agree with you.

The PHP OOP access modifiers are used to control the visibility for maintaining data integrity.

I don't think we can rely on them as a security approach.

  • stefan.korn authored 950633c on 8.x-3.x
    Issue #3117745 by stefan.korn: Make csrftoken protected class member
    

  • stefan.korn authored e6d6720 on 9.x-1.x
    Issue #3117745 by stefan.korn: Make csrftoken protected class member
    
mingsong’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.