You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "rovarga (via GitHub)" <gi...@apache.org> on 2023/03/24 12:23:01 UTC

[GitHub] [mina-sshd] rovarga opened a new pull request, #267: Validate ptyModes

rovarga opened a new pull request, #267:
URL: https://github.com/apache/mina-sshd/pull/267

   We expect each value to be a valid UINT32 once we do PtyCapableChannelSession.doOpenPty(). Make sure we validate that assumption when we setPtyModes().
   
   Signed-off-by: Robert Varga <ro...@pantheon.tech>


-- 
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: dev-unsubscribe@mina.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] rovarga commented on pull request #267: Validate ptyModes

Posted by GitBox <gi...@apache.org>.
rovarga commented on PR #267:
URL: https://github.com/apache/mina-sshd/pull/267#issuecomment-1309738326

   This is driven by downstream issues:
   - https://jira.opendaylight.org/browse/TRNSPRTPCE-701
   - https://issues.apache.org/jira/browse/KARAF-7607
   
   We should flag any attempt to set invalid configuration before we act on them (and reject them as part of SSHD-1244).


-- 
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: dev-unsubscribe@mina.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] rovarga closed pull request #267: Validate ptyModes

Posted by "rovarga (via GitHub)" <gi...@apache.org>.
rovarga closed pull request #267: Validate ptyModes
URL: https://github.com/apache/mina-sshd/pull/267


-- 
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: dev-unsubscribe@mina.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #267: Validate ptyModes

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on code in PR #267:
URL: https://github.com/apache/mina-sshd/pull/267#discussion_r1019652136


##########
sshd-common/src/main/java/org/apache/sshd/common/channel/PtyChannelConfiguration.java:
##########
@@ -94,6 +95,8 @@ public Map<PtyMode, Integer> getPtyModes() {
 
     @Override
     public void setPtyModes(Map<PtyMode, Integer> ptyModes) {
+        ptyModes.forEach(
+            (key, value) -> BufferUtils.validateUint32Value(value, "Mode %s has invalid value %s", key, value));

Review Comment:
   Make a copy of the map? The caller might add more values afterwards... And should getPtyModes() return a read-only copy?



-- 
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: dev-unsubscribe@mina.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


[GitHub] [mina-sshd] lgoldstein commented on pull request #267: Validate ptyModes

Posted by "lgoldstein (via GitHub)" <gi...@apache.org>.
lgoldstein commented on PR #267:
URL: https://github.com/apache/mina-sshd/pull/267#issuecomment-1481947794

   Please close this (expired)


-- 
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: dev-unsubscribe@mina.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org