Repository navigation
Commit bb14edd
committed
fix(config): cap http/jsonrpc maxMessageSize at Integer.MAX_VALUE
Align node.http.maxMessageSize and node.jsonrpc.maxMessageSize with the
existing node.rpc.maxMessageSize rule: reject values > Integer.MAX_VALUE
at startup with TronError. Downstream body materialization is int-bounded
(String/byte[]/StringBuilder all cap at Integer.MAX_VALUE), so config
values beyond that produced an ambiguous silent mismatch; fail-fast is
safer than a runtime NegativeArraySizeException or truncation surprise.
Update config.conf docblocks (http/rpc/jsonrpc) to state the full
constraint. Replace the obsolete 2Gi success assertion in
testMaxMessageSizeHumanReadable, add testHttpMaxMessageSizeExceedsIntMax
and testJsonRpcMaxMessageSizeExceedsIntMax mirroring the existing rpc
case.1 parent f360750 commit bb14edd
3 files changed
Lines changed: 40 additions & 19 deletions
File tree
- framework/src
- main
- java/org/tron/core/config/args
- resources
- test/java/org/tron/core/config/args
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
540 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
541 | 543 | | |
542 | 544 | | |
543 | 545 | | |
544 | 546 | | |
545 | 547 | | |
546 | | - | |
547 | | - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
| |||
254 | 255 | | |
255 | 256 | | |
256 | 257 | | |
257 | | - | |
| 258 | + | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
365 | 367 | | |
366 | 368 | | |
367 | 369 | | |
368 | | - | |
| 370 | + | |
| 371 | + | |
369 | 372 | | |
370 | 373 | | |
371 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | 432 | | |
444 | 433 | | |
445 | 434 | | |
| |||
477 | 466 | | |
478 | 467 | | |
479 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
480 | 494 | | |
481 | 495 | | |
482 | 496 | | |
| |||
0 commit comments