[kronolith] adding an invitation to calendar results in DB error / reusing event_ids as a primary key

Bernhard Erdmann be at berdmann.de
Sun Jul 11 14:48:58 PDT 2004


Hi,

by modifying the primary key of kronolith_events requests by others can 
be inserted into my own calendar:

PRIMARY KEY (event_id)   =>   PRIMARY KEY (event_id,calendar_id)


OLD:

CREATE TABLE kronolith_events (
   event_id varchar(32) NOT NULL default '',
   calendar_id varchar(255) NOT NULL default '',
   event_creator_id varchar(255) NOT NULL default '',
   event_description text,
   event_location text,
   event_status int(11) default '0',
   event_attendees text,
   event_keywords text,
   event_exceptions text,
   event_title varchar(80) default NULL,
   event_category varchar(80) default NULL,
   event_recurtype varchar(11) default '0',
   event_recurinterval varchar(11) default NULL,
   event_recurdays varchar(11) default NULL,
   event_recurenddate datetime default NULL,
   event_start datetime default NULL,
   event_end datetime default NULL,
   event_alarm int(11) default '0',
   event_modified int(11) NOT NULL default '0',
   PRIMARY KEY  (event_id),
   KEY kronolith_calendar_idx (calendar_id)
) TYPE=MyISAM;


NEW:

CREATE TABLE kronolith_events (
   event_id varchar(32) NOT NULL default '',
   calendar_id varchar(255) NOT NULL default '',
   event_creator_id varchar(255) NOT NULL default '',
   event_description text,
   event_location text,
   event_status int(11) default '0',
   event_attendees text,
   event_keywords text,
   event_exceptions text,
   event_title varchar(80) default NULL,
   event_category varchar(80) default NULL,
   event_recurtype varchar(11) default '0',
   event_recurinterval varchar(11) default NULL,
   event_recurdays varchar(11) default NULL,
   event_recurenddate datetime default NULL,
   event_start datetime default NULL,
   event_end datetime default NULL,
   event_alarm int(11) default '0',
   event_modified int(11) NOT NULL default '0',
   PRIMARY KEY  (event_id,calendar_id),
   KEY kronolith_calendar_idx (calendar_id)
) TYPE=MyISAM;



More information about the kronolith mailing list