Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same old 0x63 #6

Open
lootch opened this issue Apr 3, 2016 · 10 comments
Open

Same old 0x63 #6

lootch opened this issue Apr 3, 2016 · 10 comments

Comments

@lootch
Copy link

lootch commented Apr 3, 2016

Is there any way one can skip GLOBAL tags on unpickling? Crashing whenever these are encountered is not much of an option.

Alternatively, can one instead tag a field as "GLOBAL" and let the unpickle process try to match GLOBAL entries to it, returning success or failure (and the ability to ignore failure) back to the invoker?

Happy to help code the process, whichever way, but I'll need some guidance.

Lucio.

@hydrogen18
Copy link
Owner

My original thoughts on this was to try and define an interface like GlobalHandler that the library would call (if provided) to allow it to handle the GLOBAL opcode. It might work for what you are suggesting.

Can you provide me with some examples of pickled data that containts GLOBAL that you think the library can usefully handle?

@lootch
Copy link
Author

lootch commented Apr 9, 2016

I've attached a smallish "mailman" configuration that contains at
least one 0x63 object. The contents could be sensitive, please do not
publish it or release it where it could cause harm (including letting
on that I released sensitive information :-)).

I investigated github.com/kisielk/og-rek as an alternative. It is
fiendishly clever, but has its own shortcomings. Use of "reflect" is a
bit alien to me, even after reading Rob Pike's paper, so I won't make
any pronouncements, but I believe that your package could incorporate
some of kisielk's tricks.

I don't think I will ever have the savvy to merge enough of the two
approaches to satisfy the requirements that are facing me. But I will
help as far as possible.

Lucio.

PS: I found that "Password" as a field name overrules the tag in the
same field (wrong precedence), even when another field has "password"
as its own tag. There was also a more peculiar error report involving
a map[interface{}]interface{} type, I think some parsing failed. This
is harder to explain, but I'll send you an example if you need one.

In all respects, I like both packages, but your competitor has a bit
of an edge in simplicity, which then falls short when one wants a less
blunt tool. I do thank you for your help.

On 4/9/16, Eric Urban notifications@github.com wrote:

My original thoughts on this was to try and define an interface like
GlobalHandler that the library would call (if provided) to allow it to
handle the GLOBAL opcode. It might work for what you are suggesting.

Can you provide me with some examples of pickled data that containts
GLOBAL that you think the library can usefully handle?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#6 (comment)

@hydrogen18
Copy link
Owner

I believe you replied to me via GitHub, which I think scrubbed your attachments. You can email me directly hydrogen18@gmail.com

@hydrogen18
Copy link
Owner

I received your file directly via email, although I probably won't have time to investigate it until this weekend. Can you open a separate issue about the field name over writing? It sounds like it is probably a valid complaint, but a separate bug entirely.

@hydrogen18
Copy link
Owner

So the pickle you sent me will basically create a Mailman.Bouncer _BounceInfo object and set it up using __setstate__ on the object. I am thinking that maybe a specific type declared in my package that is really just a map[string]interface{} can emulate this adequately.

@lootch
Copy link
Author

lootch commented Apr 17, 2016

Hi, Eric. I'm sorry I did not get back to you before the weekend, I
thought I would, then found myself swamped. I'll see what I can manage
today. Thank you for continuing to look into this.

Lucio.

On 4/17/16, Eric Urban notifications@github.com wrote:

So the pickle you sent me will basically create a Mailman.Bouncer _BounceInfo object and set it up using __setstate__ on the object. I am
thinking that maybe a specific type declared in my package that is really
just a map[string]interface{} can emulate this adequately.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#6 (comment)

@hydrogen18
Copy link
Owner

Support for this has been added. Please review the documentation and reopen if you can't get it to work

@lootch
Copy link
Author

lootch commented Apr 25, 2018 via email

@hydrogen18
Copy link
Owner

I looked at this an 0x6F is some op-code I missed in implementation & testing. It's added as part of protocol 1. It's some shorthand for 0x63 so it should be easy to implement once I find time.

@hydrogen18 hydrogen18 reopened this May 3, 2018
@lootch
Copy link
Author

lootch commented May 3, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants