Vinai / nicer-image-names

Magento extension to build catalog image file names from product attributes so they have neat descriptive names.
77 stars 31 forks source link

Error if the product name have some specific characters #38

Open danielchicote opened 7 years ago

danielchicote commented 7 years ago

I have detected that the module don't handles correctly the product names if they have characters like "?" or "ñ" in the name. I have tried to fix it but it excess my knowledge.

Razorphyn commented 7 years ago

I haven't checked the code, since I have come across this module randomly, but I guess is problem of "allowed filename", I would rely on some proved code to check the name, like: File::Spec, since the check would be a little complicated I guess.

The most brutal way I can think of is to try to create a file with the given name(after a first regex control) and check if it exist or do not return error and in case delete it, but I think is widely open to issues.