[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: findRelation.js
"use strict"; function findRelation_upToPath(urlObj, siteUrlObj, options) { // Path- or root-relative URL var pathOnly = urlObj.extra.hrefInfo.minimumPathOnly; // Matching scheme, scheme-relative or path-only var minimumScheme = (urlObj.scheme===siteUrlObj.scheme || !urlObj.scheme); // Matching auth, ignoring auth or path-only var minimumAuth = minimumScheme && (urlObj.auth===siteUrlObj.auth || options.removeAuth || pathOnly); // Matching host or path-only var www = options.ignore_www ? "stripped" : "full"; var minimumHost = minimumAuth && (urlObj.host[www]===siteUrlObj.host[www] || pathOnly); // Matching port or path-only var minimumPort = minimumHost && (urlObj.port===siteUrlObj.port || pathOnly); urlObj.extra.relation.minimumScheme = minimumScheme; urlObj.extra.relation.minimumAuth = minimumAuth; urlObj.extra.relation.minimumHost = minimumHost; urlObj.extra.relation.minimumPort = minimumPort; urlObj.extra.relation.maximumScheme = !minimumScheme || minimumScheme && !minimumAuth; urlObj.extra.relation.maximumAuth = !minimumScheme || minimumScheme && !minimumHost; urlObj.extra.relation.maximumHost = !minimumScheme || minimumScheme && !minimumPort; } function findRelation_pathOn(urlObj, siteUrlObj, options) { var queryOnly = urlObj.extra.hrefInfo.minimumQueryOnly; var hashOnly = urlObj.extra.hrefInfo.minimumHashOnly; var empty = urlObj.extra.hrefInfo.empty; // not required, but self-documenting // From upToPath() var minimumPort = urlObj.extra.relation.minimumPort; var minimumScheme = urlObj.extra.relation.minimumScheme; // Matching port and path var minimumPath = minimumPort && urlObj.path.absolute.string===siteUrlObj.path.absolute.string; // Matching resource or query/hash-only or empty var matchingResource = (urlObj.resource===siteUrlObj.resource || !urlObj.resource && siteUrlObj.extra.resourceIsIndex) || (options.removeDirectoryIndexes && urlObj.extra.resourceIsIndex && !siteUrlObj.resource); var minimumResource = minimumPath && (matchingResource || queryOnly || hashOnly || empty); // Matching query or hash-only/empty var query = options.removeEmptyQueries ? "stripped" : "full"; var urlQuery = urlObj.query.string[query]; var siteUrlQuery = siteUrlObj.query.string[query]; var minimumQuery = (minimumResource && !!urlQuery && urlQuery===siteUrlQuery) || ((hashOnly || empty) && !urlObj.extra.hrefInfo.separatorOnlyQuery); var minimumHash = minimumQuery && urlObj.hash===siteUrlObj.hash; urlObj.extra.relation.minimumPath = minimumPath; urlObj.extra.relation.minimumResource = minimumResource; urlObj.extra.relation.minimumQuery = minimumQuery; urlObj.extra.relation.minimumHash = minimumHash; urlObj.extra.relation.maximumPort = !minimumScheme || minimumScheme && !minimumPath; urlObj.extra.relation.maximumPath = !minimumScheme || minimumScheme && !minimumResource; urlObj.extra.relation.maximumResource = !minimumScheme || minimumScheme && !minimumQuery; urlObj.extra.relation.maximumQuery = !minimumScheme || minimumScheme && !minimumHash; urlObj.extra.relation.maximumHash = !minimumScheme || minimumScheme && !minimumHash; // there's nothing after hash, so it's the same as maximumQuery // Matching path and/or resource with existing but non-matching site query urlObj.extra.relation.overridesQuery = minimumPath && urlObj.extra.relation.maximumResource && !minimumQuery && !!siteUrlQuery; } module.exports = { pathOn: findRelation_pathOn, upToPath: findRelation_upToPath };
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.51 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002