Jokosher extensions should not end in .py or .egg

Bug #76684 reported by Brent Core
2
Affects Status Importance Assigned to Milestone
Jokosher
Confirmed
Low
Unassigned

Bug Description

If extensions end in .py or .egg, then this will confuse users who may have other files on their system that end in .py. They may try to load it into Jokosher, causing untold mayhem. I like how Jokosher projects end in .jokosher, giving the user an actual semblance of what the file is used for and what program uses it. Maybe extensions should end in .jextension or jokostension or jokostend? Just anything but .py.

Revision history for this message
Laszlo Pandy (laszlok) wrote :

I agree that importing a random .py file into Jokosher could be pretty bad, but do we really want to require distros to recognize every single mime-type we throw at them? Should we really be encouraging the proliferation of ultra-specific mime types like .jextension or .jpresets, etc? Maybe we could make these files just use a generic ending like .xml or something.

Revision history for this message
Brent Core (brentcore2) wrote :

agreed. .xml sounds like a good idea. Maybe there could be some kind of (sorta) security mechanism to prevent non-Jokosher-related .py files from running in the extensions manager? Like just a quick variable check in the code before loading it? Granted, it's not really "security" but at least it would prevent a user from accidentally ruining something by haphazardly loading some python code.

Revision history for this message
John Green (john-thegreens) wrote :

Hmm I see the problem here. The extension module being imported has to satisfy quite rigorous checks to see that it is a valid extension. However to do this it has to first be imported. And if, instead of being an importable module, it is ,say , a script then this means it gets executed. Maybe we need some sanity checking like the variable check you mention before we import.

We looked at using a different extension name but the egg system doesn't like being called anything other than .egg

Changed in jokosher:
importance: Undecided → Low
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.