Search Unity

google play vulnerable to Intent Redirection Error.

Discussion in 'Editor & General Support' started by ethanisdaboss123, Sep 25, 2019.

  1. ethanisdaboss123

    ethanisdaboss123

    Joined:
    Sep 1, 2019
    Posts:
    3
    Hey I am trying to build a custom image maker to load on the player as its skin but google play sends me this error code, Your app(s) are vulnerable to Intent Redirection. Do you think ether of these script have anything to do with it.

    using System.Collections;
    using System.IO;
    using UnityEngine;

    public class PaintableSkin : MonoBehaviour {

    public GameObject Brush;
    public float BrushSize = 0.1f;
    public RenderTexture RTexture;
    static public int filenum = GunC.filedir;
    static public string fileDirName;
    // Use this for initialization
    void Start () {

    }
    public void Renamer ()
    {
    GunC.filedir++;
    }
    // Update is called once per frame
    void Update () {
    filenum = GunC.filedir;
    fileDirName = "/savedSkin(" + filenum + ").png";
    if (Input.GetMouseButton(0))
    {
    //cast a ray to the plane
    var Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;
    if(Physics.Raycast(Ray, out hit))
    {
    //instanciate a brush
    var go = Instantiate(Brush, hit.point + Vector3.up * 0.1f, Quaternion.identity, transform);
    go.transform.localScale = Vector3.one * BrushSize;
    }

    }
    }

    public void Save()
    {
    Renamer();
    StartCoroutine(CoSave());
    }

    private IEnumerator CoSave()
    {
    //wait for rendering
    yield return new WaitForEndOfFrame();
    Debug.Log(Application.dataPath + fileDirName);

    //set active texture
    RenderTexture.active = RTexture;

    //convert rendering texture to texture2D
    var texture2D = new Texture2D(RTexture.width, RTexture.height);
    texture2D.ReadPixels(new Rect(0, 0, RTexture.width, RTexture.height), 0, 0);
    texture2D.Apply();

    //write data to file
    var data = texture2D.EncodeToPNG();
    File.WriteAllBytes(Application.dataPath + fileDirName, data);


    }
    }
    or





    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI;
    public class skinManaging : MonoBehaviour
    {
    public Material texture;
    // Use this for initialization
    IEnumerator Start()
    {
    WWW www = new WWW(Application.dataPath + Paintable.filename);
    while (!www.isDone)
    yield return null;
    texture.mainTexture = www.texture;
    }
    }

    Please help fix before December 17.