You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "peter.doornbosch" <pe...@gmail.com> on 2008/03/15 12:53:48 UTC

configuration admin accepts key containing space

Hi,

The ConfigurationAdmin service accepts keys that contain spaces and  
writes such values to the file store. This causes problems when  
restarting, as it can't parse the file that it wrote itself:

*ERROR* Error loading configuration for needsconfig
java.io.IOException: Unexpected token 78; expected: 61 (line=2, pos=15)
	at  
org 
.apache 
.felix 
.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:651)
	at  
org 
.apache 
.felix 
.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java: 
270)

The bogus key/values is not always passed to the managed service  
(sometimes it is), but i could not yet determine under which  
circumstances it is / is not passed. However, it's always written to  
the file store.

Regards,
Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Peter,

Am Dienstag, den 22.04.2008, 21:29 +0200 schrieb peter.doornbosch:
> Hi Felix,
> 
> 
> On 26 Mar , 2008, at 11:49 , Felix Meschberger wrote:
> > I opened issue FELIX-522 and committed a fix, which prevents using
> > illegal keys. Illegal configuration files can still not be read ...  
> > but
> > they should not be written any more because trying to set a
> > configuration property with an invalid key will yield an
> > IllegalArgumentException.
> >
> > Can you please confirm whether this is ok for you ? Thanks.
> 
> Perfect.
> Thanks!

Good. Thanks.
> 
> Sorry for the late reply; i missed your message (initially).

No problem. Better late than never ;-)

Regards
Felix

> 
> Regards,
> Peter
> 
> >
> >
> > Regards
> > Felix
> >
> > [1] http://issues.apache.org/jira/browse/FELIX-522
> >
> > Am Samstag, den 15.03.2008, 12:53 +0100 schrieb peter.doornbosch:
> >> Hi,
> >>
> >> The ConfigurationAdmin service accepts keys that contain spaces and
> >> writes such values to the file store. This causes problems when
> >> restarting, as it can't parse the file that it wrote itself:
> >>
> >> *ERROR* Error loading configuration for needsconfig
> >> java.io.IOException: Unexpected token 78; expected: 61 (line=2,  
> >> pos=15)
> >> 	at
> >> org
> >> .apache
> >> .felix
> >> .cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java: 
> >> 651)
> >> 	at
> >> org
> >> .apache
> >> .felix
> >> .cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:
> >> 270)
> >>
> >> The bogus key/values is not always passed to the managed service
> >> (sometimes it is), but i could not yet determine under which
> >> circumstances it is / is not passed. However, it's always written to
> >> the file store.
> >>
> >> Regards,
> >> Peter
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by "peter.doornbosch" <pe...@gmail.com>.
Hi Felix,


On 26 Mar , 2008, at 11:49 , Felix Meschberger wrote:
> I opened issue FELIX-522 and committed a fix, which prevents using
> illegal keys. Illegal configuration files can still not be read ...  
> but
> they should not be written any more because trying to set a
> configuration property with an invalid key will yield an
> IllegalArgumentException.
>
> Can you please confirm whether this is ok for you ? Thanks.

Perfect.
Thanks!

Sorry for the late reply; i missed your message (initially).

Regards,
Peter

>
>
> Regards
> Felix
>
> [1] http://issues.apache.org/jira/browse/FELIX-522
>
> Am Samstag, den 15.03.2008, 12:53 +0100 schrieb peter.doornbosch:
>> Hi,
>>
>> The ConfigurationAdmin service accepts keys that contain spaces and
>> writes such values to the file store. This causes problems when
>> restarting, as it can't parse the file that it wrote itself:
>>
>> *ERROR* Error loading configuration for needsconfig
>> java.io.IOException: Unexpected token 78; expected: 61 (line=2,  
>> pos=15)
>> 	at
>> org
>> .apache
>> .felix
>> .cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java: 
>> 651)
>> 	at
>> org
>> .apache
>> .felix
>> .cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:
>> 270)
>>
>> The bogus key/values is not always passed to the managed service
>> (sometimes it is), but i could not yet determine under which
>> circumstances it is / is not passed. However, it's always written to
>> the file store.
>>
>> Regards,
>> Peter
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Peter,

The problem is that the Configuration Admin Service implementation
allows illegal keys and can perfectly write them - but not read them
back in.

I opened issue FELIX-522 and committed a fix, which prevents using
illegal keys. Illegal configuration files can still not be read ... but
they should not be written any more because trying to set a
configuration property with an invalid key will yield an
IllegalArgumentException.

Can you please confirm whether this is ok for you ? Thanks.

Regards
Felix

[1] http://issues.apache.org/jira/browse/FELIX-522

Am Samstag, den 15.03.2008, 12:53 +0100 schrieb peter.doornbosch:
> Hi,
> 
> The ConfigurationAdmin service accepts keys that contain spaces and  
> writes such values to the file store. This causes problems when  
> restarting, as it can't parse the file that it wrote itself:
> 
> *ERROR* Error loading configuration for needsconfig
> java.io.IOException: Unexpected token 78; expected: 61 (line=2, pos=15)
> 	at  
> org 
> .apache 
> .felix 
> .cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:651)
> 	at  
> org 
> .apache 
> .felix 
> .cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java: 
> 270)
> 
> The bogus key/values is not always passed to the managed service  
> (sometimes it is), but i could not yet determine under which  
> circumstances it is / is not passed. However, it's always written to  
> the file store.
> 
> Regards,
> Peter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by Carsten Ziegeler <cz...@apache.org>.
peter.doornbosch wrote:
> Hi,
> 
> Yes, i will. Can you add a "configuration admin" component to Jira?
> 
Thanks - it's already there :)

Carsten

-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by "peter.doornbosch" <pe...@gmail.com>.
Hi,

Yes, i will. Can you add a "configuration admin" component to Jira?

Regards,
Peter

On 17 Mar , 2008, at 10:25 AM, Carsten Ziegeler wrote:

> Hi,
>
> it seems that the configuration admin does not check for valid pids  
> (according to the spec). Can you please open a bug for it?
>
> Thanks
> Carsten
>
> peter.doornbosch wrote:
>> Hi,
>> The ConfigurationAdmin service accepts keys that contain spaces and  
>> writes such values to the file store. This causes problems when  
>> restarting, as it can't parse the file that it wrote itself:
>> *ERROR* Error loading configuration for needsconfig
>> java.io.IOException: Unexpected token 78; expected: 61 (line=2,  
>> pos=15)
>>    at  
>> org 
>> .apache 
>> .felix 
>> .cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java: 
>> 651)     at  
>> org 
>> .apache 
>> .felix 
>> .cm 
>> .file.ConfigurationHandler.readInternal(ConfigurationHandler.java: 
>> 270) The bogus key/values is not always passed to the managed  
>> service (sometimes it is), but i could not yet determine under  
>> which circumstances it is / is not passed. However, it's always  
>> written to the file store.
>> Regards,
>> Peter
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>
>
> -- 
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: configuration admin accepts key containing space

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,

it seems that the configuration admin does not check for valid pids 
(according to the spec). Can you please open a bug for it?

Thanks
Carsten

peter.doornbosch wrote:
> Hi,
> 
> The ConfigurationAdmin service accepts keys that contain spaces and 
> writes such values to the file store. This causes problems when 
> restarting, as it can't parse the file that it wrote itself:
> 
> *ERROR* Error loading configuration for needsconfig
> java.io.IOException: Unexpected token 78; expected: 61 (line=2, pos=15)
>     at 
> org.apache.felix.cm.file.ConfigurationHandler.readFailure(ConfigurationHandler.java:651) 
> 
>     at 
> org.apache.felix.cm.file.ConfigurationHandler.readInternal(ConfigurationHandler.java:270) 
> 
> 
> The bogus key/values is not always passed to the managed service 
> (sometimes it is), but i could not yet determine under which 
> circumstances it is / is not passed. However, it's always written to the 
> file store.
> 
> Regards,
> Peter
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 


-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org