[ https://issues.apache.org/jira/browse/HDDS-12244 ]


    Gargi Jaiswal deleted comment on HDDS-12244:
    --------------------------------------

was (Author: JIRAUSER308350):
Over here '{*}<{*}' and '{*}>{*}' is acting as a *redirector operator.*
In order to check for the illegal keyname character validation for it , the 
entire path need to be enclosed in the double quotes.
{code:java}
ozone sh key put "/vol1/buck1/gargi<12" f1.txt
Invalid key name: gargi<12 {code}
 

> Fix the regex for illegal keyname character validation
> ------------------------------------------------------
>
>                 Key: HDDS-12244
>                 URL: https://issues.apache.org/jira/browse/HDDS-12244
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone CLI
>    Affects Versions: 2.0.0
>            Reporter: Gargi Jaiswal
>            Assignee: Gargi Jaiswal
>            Priority: Major
>
> The current regular expression to filter the invalid *S3* key name is 
> accepting the key names with *'<'* and *'>'* as the string (eg., ke<y>1.txt) 
> when we set the following congifuration to true{*}:{*}
> {code:java}
>  OZONE-SITE.XML_ozone.om.keyname.character.check.enabled=true
> {code}
> {color:#172b4d}On running the key put it is accepting invalid key name:{color}
> {color:#172b4d}Command:{color}
> {code:java}
> bash-5.1$ ozone sh key put /vol1/buck1/ke<>y1 f1.txt
> bash-5.1$ ozone sh key put /vol1/buck1/k>ey1 f1.txt  
> bash-5.1$ ozone sh key put /vol1/buck1/ke<y1 f1.txt
>  {code}
> {color:#172b4d}Output needed to be fixed:
> 1. It is accepting the above mentioned key name and writing the file in it 
> without showing the error message.
> 2.It is creating key names by omitting any character written after '{*}<{*}' 
> or '{*}>{*}'.
> You can refer to the 
> [https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html] *aws 
> S3 docs* to see the object key checking guideline.{color}
> {color:#172b4d}Proposed fix:
> 1. Even for strings containing '{*}<{*}' or '{*}>{*}' it should give error 
> message and not create string omitting this.{color}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to