forked from loafle/openapi-generator-original
better handle of single quote to avoid code injectio in php
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Swagger Petstore =end
|
||||
* Swagger Petstore ' \" =end
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 =end
|
||||
* Contact: apiteam@swagger.io =end
|
||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
||||
* Contact: apiteam@swagger.io ' \" =end
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -73,7 +73,7 @@ class FakeApi
|
||||
{
|
||||
if ($apiClient == null) {
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ ' " =end/v2 */ ' " =end');
|
||||
}
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
@@ -138,7 +138,7 @@ class FakeApi
|
||||
if (!is_null($_header_accept)) {
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','*/ =end'));
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','*/ =end));(phpinfo('));
|
||||
|
||||
// default format to json
|
||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Swagger Petstore =end
|
||||
* Swagger Petstore ' \" =end
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 =end
|
||||
* Contact: apiteam@swagger.io =end
|
||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
||||
* Contact: apiteam@swagger.io ' \" =end
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -73,7 +73,7 @@ class PetApi
|
||||
{
|
||||
if ($apiClient == null) {
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ ' " =end/v2 */ ' " =end');
|
||||
}
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Swagger Petstore =end
|
||||
* Swagger Petstore ' \" =end
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 =end
|
||||
* Contact: apiteam@swagger.io =end
|
||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
||||
* Contact: apiteam@swagger.io ' \" =end
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -73,7 +73,7 @@ class StoreApi
|
||||
{
|
||||
if ($apiClient == null) {
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ ' " =end/v2 */ ' " =end');
|
||||
}
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Swagger Petstore =end
|
||||
* Swagger Petstore ' \" =end
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ ' \" =end
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 =end
|
||||
* Contact: apiteam@swagger.io =end
|
||||
* OpenAPI spec version: 1.0.0 ' \" =end
|
||||
* Contact: apiteam@swagger.io ' \" =end
|
||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -73,7 +73,7 @@ class UserApi
|
||||
{
|
||||
if ($apiClient == null) {
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ ' " =end/v2 */ ' " =end');
|
||||
}
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
|
||||
Reference in New Issue
Block a user