[Seaside] Re: Problems with Zinc and DigestAuthentication

Dav lasmiste at gmail.com
Mon May 21 16:49:02 UTC 2012


Hi Sven

You are right, here some more info:
Version: Pharo1.4 of 18 April 2012 update 14438 - Zinc HTTP Components 1.0

My setup is:

ZnZincServerAdaptor startOn:8080 .  

authenticator := ZnDigestAuthenticator new.
authenticator realm:'........'.
authenticator atUsername: '....' putPassword: '.....' .
ZnZincServerAdaptor default server authenticator: authenticator .


and finally I can post some more stack info:


-------------------------------------------------------------------------------

THERE_BE_DRAGONS_HERE
PrimitiveFailed: primitive #basicNew: in ByteString class failed


VM: unix - i686 - linux-gnu - CoInterpreter
VMMaker-oscog-EstebanLorenzano.158 uuid:
82eded98-68af-4c80-a472-4f6de293adcf May  1 2012,
StackToRegisterMappingCogit VMMaker-oscog-EstebanLorenzano.158 uuid:
82eded98-68af-4c80-a472-4f6de293adcf May  1 2012,
https://git.gitorious.org/cogvm/blessed.git Commit:
6aa3fd0f1188078d3167dec1a53031a61b97b688 Date: Tue May 1 20:28:14 2012 +0200
By: Esteban Lorenzano <estebanlm at gmail.com>
Image: Pharo1.4 [Latest update: #14438]

ByteString class(Object)>>primitiveFailed:
	Receiver: ByteString
	Arguments and temporary variables: 
		selector: 	#basicNew:
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->(ByteString>>#asByteArray "a
Compi...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize
indexOfAnyO...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	a Dictionary(#NonAsciiMap->#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0...etc...
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#'Collections-Strings'
		traitComposition: 	{}
		localSelectors: 	nil


ByteString class(Object)>>primitiveFailed
	Receiver: ByteString
	Arguments and temporary variables: 

	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->(ByteString>>#asByteArray "a
Compi...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize
indexOfAnyO...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	a Dictionary(#NonAsciiMap->#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0...etc...
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#'Collections-Strings'
		traitComposition: 	{}
		localSelectors: 	nil


ByteString class(Behavior)>>basicNew:
	Receiver: ByteString
	Arguments and temporary variables: 
		sizeRequested: 	-2
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->(ByteString>>#asByteArray "a
Compi...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize
indexOfAnyO...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	a Dictionary(#NonAsciiMap->#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0...etc...
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#'Collections-Strings'
		traitComposition: 	{}
		localSelectors: 	nil


ByteString class(String class)>>new:
	Receiver: ByteString
	Arguments and temporary variables: 
		sizeRequested: 	-2
	Receiver's instance variables: 
		superclass: 	String
		methodDict: 	a MethodDictionary(#asByteArray->(ByteString>>#asByteArray "a
Compi...etc...
		format: 	23554
		instanceVariables: 	nil
		organization: 	('accessing' at: at:put: byteAt: byteAt:put: byteSize
indexOfAnyO...etc...
		subclasses: 	nil
		name: 	#ByteString
		classPool: 	a Dictionary(#NonAsciiMap->#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0...etc...
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#'Collections-Strings'
		traitComposition: 	{}
		localSelectors: 	nil


ByteString(SequenceableCollection)>>copyFrom:to:
	Receiver: ''
	Arguments and temporary variables: 
		start: 	2
		stop: 	-1
		newSize: 	-2
	Receiver's instance variables: 
''

[:fragment | 
| tokens i key value |
tokens := fragment trimBoth.
	i := tokens indexOf: $=.
	i > 0
		ifTrue: [key := tokens copyFrom: 1 to: i - 1.
			value := tokens copyFrom: i + 1 to: tokens size.
			dict
				at: key
				put: (value copyFrom: 2 to: value size - 1)]] in ZnDigestAuthenticator
class>>parseAuthRequest:
	Receiver: ZnDigestAuthenticator
	Arguments and temporary variables: 
		dict: 	' algorithm='
		fragment: 	a Dictionary('nonce'->'hidden nonce' 'realm'->'hidden
realm..etc...
		tokens: 	'algorithm='
		i: 	10
		key: 	'algorithm'
		value: 	''
	Receiver's instance variables: 
		superclass: 	ZnBasicAuthenticator
		methodDict: 	a MethodDictionary(#a1for:->(ZnDigestAuthenticator>>#a1for:
"a Comp...etc...
		format: 	136
		instanceVariables: 	#('nonces')
		organization: 	('accessing' nonces)
('public' authHeader)
('testing' isRequestAu...etc...
		subclasses: 	nil
		name: 	#ZnDigestAuthenticator
		classPool: 	nil
		sharedPools: 	nil
		environment: 	a SystemDictionary(lots of globals)
		category: 	#'Zinc-HTTP-Support'
		traitComposition: 	{}
		localSelectors: 	nil


Array(SequenceableCollection)>>do:
	Receiver: #('username=""' ' realm="hidden realm...
	Arguments and temporary variables: 
		aBlock: 	[:fragment | 
| tokens i key value |
tokens := fragment trimBoth.
	i :=...etc...
		index: 	5
		indexLimiT: 	10
	Receiver's instance variables: 
#('username=""' ' realm="hidden realm...


As you can see username is empty string, realm and nonce are hidden by me.
Unfortunately I tried to simulate the bug authenticating myself with empty
string but no errors occurred

Cheers
 Dave



Sven Van Caekenberghe wrote
> 
> 
> Some more context would be welcome, what specific versions of
> Smalltalk/Zinc are you using ?
> What is your setup?
> Can you get your hands on the argument to ZnDigestAuthenticator
> class>>parseAuthRequest: that crashes ?
> 
> Sven
> 
> 
> _______________________________________________
> seaside mailing list
> seaside at .squeakfoundation
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 


--
View this message in context: http://forum.world.st/Problems-with-Zinc-and-DigestAuthentication-tp4631194p4631210.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list