Checks whether resource URLs should be rendered in secure mode or not.
@return true if resource URLs should be rendered in secure mode
556975
private boolean isResourceUrlSecure(Page page) {
    ValueMap props = getPagePropertiesNullSafe(page);
    IntegratorMode mode = getIntegratorMode(props);
    if (mode.isDetectProtocol()) {
      IntegratorProtocol integratorProtocol = getIntegratorProtocol(props);
      if (integratorProtocol == IntegratorProtocol.HTTPS) {
        return true;
      }
      else if (integratorProtocol == IntegratorProtocol.AUTO) {
        return RequestPath.hasSelector(request, IntegratorHandler.SELECTOR_INTEGRATORTEMPLATE_SECURE);
      }

    }
    return false;
  }
390223
def is_safe_url(url, host=None):
    
    if url is not None:
        url = url.strip()
    if not url:
        return False
    if six.PY2:  # pragma: nocover
        try:
            url = force_text(url)
        except UnicodeDecodeError:
            return False
    # Chrome treats \ completely as / in paths but it could be part of some
    # basic auth credentials so we need to check both URLs.
    return _is_safe_url(url, host) and _is_safe_url(url.replace('\\', '/'), host)
1215329
def is_safe_url(url, host=None):
    
    if not url:
        return False
    netloc = urlparse.urlparse(url)[1]
    return not netloc or netloc == host
933934
@Override
  public boolean isSecure(HttpServletRequest request) {
    String proto = request.getHeader(X_FORWARED_PROTO);
    if( proto != null ) return proto.equalsIgnoreCase(HTTPS_PROTOCOL);
    return super.isSecure(request);
  }
911993
public static boolean validateUrl(String url) {
        String[] schemes = {"https"};
        UrlValidator urlValidator = new UrlValidator(schemes);
        return urlValidator.isValid(url);
    }
609150
public static Boolean canAccess(String url) {
		return ContextUtils.getAuthorizationEngine(ContextUtils.getRequest())
				.check(url) == null;
	}
623615
public boolean isWindowsInsecure()
  {
    String lower = getPath().toLowerCase(Locale.ENGLISH);

    int lastCh;

    if ((lastCh = lower.charAt(lower.length() - 1)) == '.'
        || lastCh == ' ' || lastCh == '*' || lastCh == '?'
        || ((lastCh == '/' || lastCh == '\\') && ! isDirectory())
        || lower.endsWith("::$data")
        || isWindowsSpecial(lower, "/con")
        || isWindowsSpecial(lower, "/aux")
        || isWindowsSpecial(lower, "/prn")
        || isWindowsSpecial(lower, "/nul")
        || isWindowsSpecial(lower, "/com1")
        || isWindowsSpecial(lower, "/com2")
        || isWindowsSpecial(lower, "/com3")
        || isWindowsSpecial(lower, "/com4")
        || isWindowsSpecial(lower, "/lpt1")
        || isWindowsSpecial(lower, "/lpt2")
        || isWindowsSpecial(lower, "/lpt3")) {
      return true;
    }

    return false;
  }
1325555
public static boolean isURLFedoraServer(String url) {

        // scheme must be http or https
        URI uri = URI.create(url);
        String scheme = uri.getScheme();
        if (!scheme.equals("http") && !scheme.equals("https")) {
            return false;
        }

        // host must be configured hostname or localhost
        String fHost = CONFIG.getParameter(FEDORA_SERVER_HOST,Parameter.class).getValue();
        String host = uri.getHost();
        if (!host.equals(fHost) && !host.equals("localhost")) {
            return false;
        }

        // path must begin with configured webapp context
        String path = uri.getPath();
        String fedoraContext = CONFIG.getParameter(
                FEDORA_SERVER_CONTEXT,Parameter.class).getValue();
        if (!path.startsWith("/" + fedoraContext + "/")) {
            return false;
        }

        // port specification must match http or https port as appropriate
        String httpPort = CONFIG.getParameter(FEDORA_SERVER_PORT,Parameter.class).getValue();
        String httpsPort = CONFIG.getParameter(FEDORA_REDIRECT_PORT,Parameter.class).getValue();
        if (uri.getPort() == -1) {
            // unspecified, so fedoraPort must be 80 (http), or 443 (https)
            if (scheme.equals("http")) {
                return httpPort.equals("80");
            } else {
                return httpsPort.equals("443");
            }
        } else {
            // specified, so must match appropriate http or https port
            String port = "" + uri.getPort();
            if (scheme.equals("http")) {
                return port.equals(httpPort);
            } else {
                return port.equals(httpsPort);
            }
        }

    }
872297
public boolean isValid() {
        if (valid == null) {
            valid = (this.resource != null);
            if (valid) {
                valid = (getResourceResolver().getResource(getPath()) != null);
            }
        }
        return valid;
    }
1273978
public static boolean isSecure(final Component component)
	{
		if (AnnotationExtensions.isAnnotationPresentInSuperClassesOrInterfaces(component.getClass(),
			RequireHttps.class))
		{
			return true;
		}
		return false;
	}
1045415
@Restricted(NoExternalUse.class)
    public boolean isUrlNull(){
        JenkinsLocationConfiguration loc = JenkinsLocationConfiguration.get();
        return loc.getUrl() == null;
    }
120141
boolean isPossiblyDetailContent(CmsResource resource) {

        if (CmsResourceTypeXmlContainerPage.isContainerPage(resource)) {
            return false;
        }
        I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(resource);
        if (type instanceof CmsResourceTypeXmlAdeConfiguration) {
            return false;
        }
        return true;
    }
267762
Boolean isResource(String resource) {
		Boolean isResource = false;
		if (!utils.isIdentifier(resource)) {
			try {
				String clazz = getControllerClass(resource);
				if (clazz != null) {
					Class.forName(clazz);
					isResource = true;
				}
			} catch (ClassNotFoundException e) {
				// It isn't a resource because there isn't a controller for it
			}
		}
		return isResource;
	}
96344
private boolean containsIncompatibleResourceType() {
    if (queryByResourceType && queryByPermission) {
      Resource[] resources = resourcesIntersection.toArray(new Resource[resourcesIntersection.size()]);
      return !ResourceTypeUtil.resourceIsContainedInArray(resourceType, resources);
    }
    return false;
  }
310571
public static boolean validateResource(String uriString) {
        try {
            URI uri = UriBasedVehicleInterfaceMixin.createUri(massageUri(uriString));
            return UriBasedVehicleInterfaceMixin.validateResource(uri) &&
                uri.getPort() < 65536;
        } catch(DataSourceException e) {
            return false;
        }
    }
147555
public static boolean isRenderableFile(Resource resource) {
        boolean result = false;
        try {
            Node node = resource.adaptTo(Node.class);
            if (node != null) {
                NodeType type = node.getPrimaryNodeType();
                if (ResourceUtil.TYPE_FILE.equals(type.getName())) {
                    String resoureName = resource.getName();
                    result = resoureName.toLowerCase().endsWith(LinkUtil.EXT_HTML);
                }
            }
        } catch (RepositoryException e) {
            // ok, not renderable
        }
        return result;
    }
1340107
public TrustedResourceUrl toTrustedResourceUrl() {
    Preconditions.checkState(
        getContentKind() == ContentKind.TRUSTED_RESOURCE_URI,
        "toTrustedResourceUrl() only valid for SanitizedContent of kind TRUSTED_RESOURCE_URI, "
            + "is: %s",
        getContentKind());
    return UncheckedConversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract(
        getContent());
  }