Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] GlobalSubs handled differently in MV 4.x than in 3.x



******    message to minivend-users from Mike Heins <mikeh@minivend.com>     ******

Quoting Randy Moore (ramoore@axion-it.net):
> 
> Hi,
> 
> I just wanted to give a warning to anyone converting existing stores from 
> MV 3.x to MV 4.x about GlobalSubs.
> 
> GlobalSubs are not supposed to be subject to Safe checks, and so, can do 
> unSafe things.
> 
> In MV 3.x, you could call a Globalsub from embedded Perl code and it would 
> be allowed to do unSafe operations, as expected.
> 
> But, under MV 4.x, this is no longer true.  If you call your GlobalSub from 
> embedded Perl code, it can NOT do unSafe operations.
> 
> I was able to get around this problem by replacing my GlobalSubs with 
> globally defined (in minivend.cfg) UserTags.  Since these are not called 
> from within Perl, they are still exempt from Safe checking.
> 
> If someone can explain the technical details as to why this changed (or 
> correct any misconceptions I have above), I'd love to know.  It may make it 
> easier to know when and if GlobalSubs can still be used for unSafe operations.
> 
> Hope this warning helps someone.

Helps me. 8-) I had no idea...it is not something I normally do so
I didn't encounter this.

But my understanding is that it should work. There are a couple of
exceptions, though.

    - If you are using SQL databases and don't have Safe::Hole installed,
    then you will have problems.

    - If the GlobalSub calls any database routines (directly or
    indirectly) and the database table has not been shared with
    tables="products arbitrary" or the like, then it will fail.

-- 
Internet Robotics, 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.7621 fax 7501 <mikeh@minivend.com>

Friends don't let friends use Outlook. -- Bob Blaylock
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: