Hi,
Thanks for the example - that looks quite good.
This is the deep-linking evaluation code from that example, it takes the startscene,s,h,v,f variables from passQueryParameter and then only uses them as parameters for loadscene and lookat calls:
<action name="startup">
if (s !== null, if (startscene === null OR startscene === "undefined", set(startscene, get(s));); );
if (startscene === null OR startscene === "undefined",
set(startscene, pano48340);
);
if(startlanguage !== null AND startlanguage !== "undefined",
set(tour_language, get(startlanguage));
);
if(starttime !== null AND starttime !== "undefined" AND starttime GT 0,
set(videoscenestarttime, get(starttime));
,
set(videoscenestarttime, 0);
);
mainloadsceneStartup(get(startscene));
if (h !== null,
if (v !== null,
if (f !== null,
lookat(get(h), get(v), get(f));
,
lookat(get(h), get(v));
);
,
if (f !== null,
lookat(get(h), get(view.vlookat), get(f));
,
lookat(get(h), get(view.vlookat));
);
);
,
if (v !== null,
if (f !== null,
lookat(get(view.hlookat), get(v), get(f));
,
lookat(get(view.hlookat), get(v));
);
,
if (f !== null,
lookat(get(view.hlookat), get(view.vlookat), get(f));
);
);
);
</action>
Display More
That means with this passQueryParameters setting it would be safe and deep-linking would also work:
passQueryParameters="startscene,s,h,f"
But - there is a small but - during checking now I just found that there would be still a theoretical way to inject unwanted code (only with passQueryParameter enabled), especially in version 1.20.12, version 1.22.4 is already more secure here. I will update both versions now (should be ready today), then this will be also fixed and no possibilities be left.
That means either use passQueryParamters=false (safe in all versions) or version 1.20.12 or 1.22.4 with a safe list of parameters for passQueryParamters.
Best regards,
Klaus