Today when playing around with uploading some users, I tried to import a file named "users.csv" and forgot to give it a new table name. Bam. Goodbye Drupal users table... Seems like we should do some sanity checking on which tables we're overwriting.

I'm going to try to provide a patch, but wanted to get some input on whether or not we should have "disallowed" table names? Or just warnings and confirmations?

CommentFileSizeAuthor
#1 803958.patch1.16 KBeporama

Comments

eporama’s picture

StatusFileSize
new1.16 KB

From the "uploadhelp" element in the fieldset for uploading the delimited file, the instructions say:

Uploading a new copy of a previously-uploaded file replaces the file data

This implies to me that we should only really be replacing file data if we had previously been working with the table in tw anyway.

So here's a possible patch that checks to make sure its a tw managed table before replacing the data...

eporama’s picture

Status: Active » Needs review

well, looks like there's not much input on this as is, so perhaps I should have set it to needs review.

mikeryan’s picture

Status: Needs review » Fixed

Good catch, I've committed it, thanks!

Status: Fixed » Closed (fixed)

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