You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/01/05 22:02:05 UTC

[GitHub] [couchdb-config] mtenrero opened a new pull request #32: Feat/allow escaped equals

mtenrero opened a new pull request #32:
URL: https://github.com/apache/couchdb-config/pull/32


   Refactor of config file parser in order to allow equals characters on the keys escaping them with a backslash.
   
   Needed for allowing declaring jwt:kid certificates whose kid contains equal signs.
   
   Related with these two bugs:
   apache/couchdb#3319
   apache/couchdb#2188


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-config] mtenrero commented on pull request #32: Feat/allow escaped equals

Posted by GitBox <gi...@apache.org>.
mtenrero commented on pull request #32:
URL: https://github.com/apache/couchdb-config/pull/32#issuecomment-813042794


   I've merged the main branch into this one, because contains the changes I had made for fixing the CI and it wasn't allowing the pipeline be green for integrating this fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-config] rnewson commented on a change in pull request #32: Feat/allow escaped equals

Posted by GitBox <gi...@apache.org>.
rnewson commented on a change in pull request #32:
URL: https://github.com/apache/couchdb-config/pull/32#discussion_r711990569



##########
File path: src/config.erl
##########
@@ -403,8 +403,9 @@ parse_ini_file(IniFile) ->
             ";" ++ _Comment ->
                 {AccSectionName, AccValues};
             Line2 ->
-                case re:split(Line2, "\s?=\s?", [{return, list}]) of

Review comment:
       would `"\s?(?<!\\\\)=\s?"` work here? (that is, split the string only on `=` when not immediately preceded by `\`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-config] rnewson commented on pull request #32: Feat/allow escaped equals

Posted by GitBox <gi...@apache.org>.
rnewson commented on pull request #32:
URL: https://github.com/apache/couchdb-config/pull/32#issuecomment-922748387


   finally noting this is not a refactor as it changes the behaviour of the software.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-config] rnewson commented on a change in pull request #32: Feat/allow escaped equals

Posted by GitBox <gi...@apache.org>.
rnewson commented on a change in pull request #32:
URL: https://github.com/apache/couchdb-config/pull/32#discussion_r711990569



##########
File path: src/config.erl
##########
@@ -403,8 +403,9 @@ parse_ini_file(IniFile) ->
             ";" ++ _Comment ->
                 {AccSectionName, AccValues};
             Line2 ->
-                case re:split(Line2, "\s?=\s?", [{return, list}]) of

Review comment:
       would `re:split(Line2, "\s?(?<!\\\\)=\s?", [{return, list}])` work here? (that is, split the string only on `=` when not immediately preceded by `\`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org