Trying to import files as any user other than UID 1 results in an error, even if he has the correct permissions to import taxonomies.

"The selected file somefile.xml could not be uploaded. Only files with the following extensions are allowed: upload_file."

This problem was also in the 1.2 code and was fixed in dev (see http://drupal.org/node/338925) . The 1.3 code looks like a refactored 1.2 code but without this fix. The fix works for me so I will be submitting it as a patch for 1.3

The form sets file_validate_extensions as the validation function, but does not correctly pass in extensions that are actually valid.

Comments

dman’s picture

Yeah, that got a bit messed up. I think you are right that some refactoring lost a change. I should commit more often.
Remembering to test as non-admin wasn't one of those things I did a lot.

dman’s picture

Something turned up broken in the update, I remember now - or rather I see the note that says "this seems to have stopped working, removing it".

I've pushed this through into 2.x-dev

carinadigital’s picture

I'll download and test :-)

dman’s picture

There's probably a reason why I haven't gone forward with the 2.x branch yet, but I can't remember what it is :-)
I jiggled a lot of things into tidier boxes, and it's all looking forward to RDF publishing and stuff of taxonomies for semantic searchers. But that's taxonomy_server project really (in private incubation)

Oh yeah, I started writing test suites ... that got dull pretty fast.

But I'd like to be able to shift folk to 2.x. 'Coz I won;t be maintaining 1.x for any good reason.
I hope I haven't wrecked anything there though.

carinadigital’s picture

Tested the 2.x branch. I can confirm that it requires 'administer taxonomy' permission and for the file extention to be from the allowed file upload types in order to upload the file, for users that are not UID 1.

dman’s picture

Status: Active » Closed (duplicate)

Updated fix / different approach in #961938: Issue #447796 reintroduced to 2.x-dev
Removed assumption/dependence on upload.module. Replaced the requirement with a hard-coded list of known safe expected extensions