<commit_before><?php
/* Copyright (C) NAVER <http://www.navercorp.com> */

class VirtualXMLDisplayHandler
{
	/**
	 * Produce virtualXML compliant content given a module object.\n
	 * @param ModuleObject $oModule the module object
	 * @return string
	 */
	function toDoc(&$oModule)
	{
		$error = $oModule->getError();
		$message = $oModule->getMessage();
		$redirect_url = $oModule->get('redirect_url');
		$request_uri = Context::get('xeRequestURI');
		$request_url = Context::get('xeVirtualRequestUrl');
		$output = new stdClass;

		if(substr_compare($request_url, '/', -1) !== 0)
		{
			$request_url .= '/';
		}

		if($error === 0)
		{
			if($message != 'success')
			{
				$output->message = $message;
			}<commit_msg>fix #1230 SECISSUE - `xeVirtualRequestUrl` parameter를 이용한 XSS 취약점 - 제보 : 한국인터넷진흥원<commit_after><?php
/* Copyright (C) NAVER <http://www.navercorp.com> */

class VirtualXMLDisplayHandler
{
	/**
	 * Produce virtualXML compliant content given a module object.\n
	 * @param ModuleObject $oModule the module object
	 * @return string
	 */
	function toDoc(&$oModule)
	{
		$error = $oModule->getError();
		$message = $oModule->getMessage();
		$redirect_url = $oModule->get('redirect_url');
		$request_uri = Context::get('xeRequestURI');
		$request_url = Context::getRequestUri();
		$output = new stdClass();

		if(substr_compare($request_url, '/', -1) !== 0)
		{
			$request_url .= '/';
		}

		if($error === 0)
		{
			if($message != 'success')
			{
				$output->message = $message;
			}
{'fraction_non_alphanumeric': 0.1761174116077385, 'fraction_numerical': 0.0066711140760507, 'mean_word_length': 3.9504950495049505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6636667', 'n_tokens_mistral': 584, 'n_tokens_neox': 532, 'n_words': 105}