Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Problem unpickling mailman config data #1

Closed
ezarko opened this Issue · 3 comments

2 participants

@ezarko
function mailman_user_options_list_load($listname) {
  $pfile = implode(DIRECTORY_SEPARATOR, array(LIST_DATA_DIR, $listname, "config.pck"));
  $i = new phpickle_unpickle();
  $i->set_debug(true);
  $dict = $i->unpickle_stream(new phpickle_stream($pfile));
}

start unpickle
read command as } (125)
op_str = EMPTY_DICT
calling op_EMPTY_DICT
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(1) to array(0) {
}

read command as ( (40)
op_str = MARK
calling op_MARK
MARK: pushed mark object(stdClass)#7 (2) {
["mark"]=>
int(1)
["__mark_cnt"]=>
int(1)
}

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 16, str: send_welcome_msg
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(2) to string(16) "send_welcome_msg"

read command as I (73)
op_str = INT
calling op_INT
INT: pushed 1
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 9, str: moderator
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(3) to string(9) "moderator"

read command as ] (93)
op_str = EMPTY_LIST
calling op_EMPTY_LIST
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(4) to array(0) {
}

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 14, str: anonymous_list
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(5) to string(14) "anonymous_list"

read command as I (73)
op_str = INT
calling op_INT
INT: pushed
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 10, str: advertised
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(6) to string(10) "advertised"

read command as K (75)
op_str = BININT1
calling op_BININT1
BININT1: val: 1
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 13, str: administrivia
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(7) to string(13) "administrivia"

read command as I (73)
op_str = INT
calling op_INT
INT: pushed 1
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 18, str: unsubscribe_policy
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(8) to string(18) "unsubscribe_policy"

read command as K (75)
op_str = BININT1
calling op_BININT1
BININT1: val: 0
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 15, str: one_last_digest
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(9) to string(15) "one_last_digest"

read command as } (125)
op_str = EMPTY_DICT
calling op_EMPTY_DICT
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(10) to array(0) {
}

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 19, str: digest_last_sent_at
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(11) to string(19) "digest_last_sent_at"

read command as K (75)
op_str = BININT1
calling op_BININT1
BININT1: val: 0
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 14, str: digest_members
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(12) to string(14) "digest_members"

read command as } (125)
op_str = EMPTY_DICT
calling op_EMPTY_DICT
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(13) to array(0) {
}

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 15, str: scrub_nondigest
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(14) to string(15) "scrub_nondigest"

read command as I (73)
op_str = INT
calling op_INT
INT: pushed
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 15, str: pass_mime_types
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(15) to string(15) "pass_mime_types"

read command as ] (93)
op_str = EMPTY_LIST
calling op_EMPTY_LIST
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(16) to array(0) {
}

read command as ( (40)
op_str = MARK
calling op_MARK
MARK: pushed mark object(stdClass)#8 (2) {
["mark"]=>
int(1)
["__mark_cnt"]=>
int(2)
}

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 15, str: multipart/mixed
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(17) to string(15) "multipart/mixed"

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 21, str: multipart/alternative
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(18) to string(21) "multipart/alternative"

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 10, str: text/plain
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(19) to string(10) "text/plain"

read command as e (101)
op_str = APPENDS
calling op_APPENDS
read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
SHORT_BINSTRING: len: 11, str: welcome_msg
read command as q (113)
op_str = BINPUT
calling op_BINPUT
BINPUT: setting memo index(20) to string(11) "welcome_msg"

read command as U (85)
op_str = SHORT_BINSTRING
calling op_SHORT_BINSTRING
PHP Fatal error: Uncaught exception 'Exception' with message 'phpickle_stream::get_bytes(0)!' in /Library/Server/Web/Data/Sites/Default/sites/all/modules/mailman_user_options/phpickle_stream.php:104
Stack trace:
#0 /Library/Server/Web/Data/Sites/Default/sites/all/modules/mailman_user_options/phpickle_gen_read_ops.php(181): phpickle_stream->get_bytes(0)
#1 /Library/Server/Web/Data/Sites/Default/sites/all/modules/mailman_user_options/phpickle_unpickle.php(66): phpickle_read_ops->op_SHORT_BINSTRING(Object(phpickle_stream), Object(phpickle_stack), Object(phpickle_memo), true)
#2 /Library/Server/Web/Data/Sites/Default/sites/all/modules/mailman_user_options/mailman_user_options.module(61): phpickle_unpickle->unpickle_stream(Object(phpickle_stream))
#3 Command line code(1): mailman_user_options_list_load('act')

@ezarko

Python 2.7.2

PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

@terryf terryf closed this
@terryf
Owner

thanks for the report!
36213c4
should fix your immediate problem. If you find anything else, let me know - it is somewhat difficult to create full test coverage of this functionality :)

but if you could send me the string that you are unpickling, I would very much like to add it to the test case list.

@ezarko

Sorry for the long delay, Terry. I finally had some free time and looked at this and my problem is indeed solved by your fix. My string contains too many other peoples email addresses (not to mention the list passwords) for me to feel really comfortable sharing. If I run in to any other issues I will see if I can come up with something to reproduce without it being live data. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.