Kara-Moon Forum
March 28, 2024, 12:01:27 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Plugin location  (Read 2106 times)
bvdp
Kara-Moon Master
****
Posts: 1436


WWW
« on: January 04, 2019, 02:46:08 AM »

In this current version the location of the plugins is fairly complicated. Assuming we're looking for the plugin 'foo' we look, in order, in:

   1. The user's current directory (./). First for a directory 'foo' and then for 'plugins/foo',
   2. Next in the directory of the file being processed (assume we're processing a lib file ...),
   3. In the MMA directory (where the libs live) in a directory called 'plugins'.

Honestly, it's a mess. But, there is a reason! As it is now the user can disable searches in any of 1, 2 or 3 but setting a flag in their .mmarc file. The idea is to make it hard to load "bad" plugins. But, as others have pointed out ... if someone is really bad they are going to bypass this "security" pretty easily.

So, here's my off-the-top idea:

    --> Have only one path or paths to search for a plugin via a new system variable PlugPath (similar to LibPath) and check that. So, Plugpath will initially be set to (probably):

     ./,  ./plugins,  MMAlib/plugins

and do away with the various (silly?) tests and restraints. Of course, users would be able to expand/modify this list in there .rc file.

I would like to maintain warning the first time a plugin is called. Probably not 100% secure ... but Smiley

Comments please!
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #1 on: January 04, 2019, 07:39:44 AM »

This will, indeed, clean up most (if not all) of the mess! And, very important, it makes the treatment of lib, includes and plugins identical and understandable.

Some thoughts.

Currently, LibPath and IncludePath are initialized to "the first folder found". I would prefer "all that exist". Same for the new PlugPath.

Remove '.'. It is much better to gently enforce the dedicated 'plugins' directory. (The user can always add '.' in the mmarc.)

I did like the concept of groove-specific plugins, so it would be nice if it still were possible to also look in a 'plugins' directory in the groove directory. But if that is too complicated, so be it. (Note that I did not mention song-specific plugins, I do not think that is relevant.)

Thanks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.052 seconds with 19 queries.