]> git.plutz.net Git - serve0/commitdiff
workaround for REFERER shy browsers: put referrer in POST data
authorpaul <paul@plutz.net>
Wed, 23 Nov 2016 17:09:29 +0000 (17:09 +0000)
committerpaul <paul@plutz.net>
Wed, 23 Nov 2016 17:09:29 +0000 (17:09 +0000)
svn path=/trunk/; revision=156

actions/meta.sh
actions/playctl.sh
actions/preferences.sh
templates/playctl.html.sh
templates/preferences.html.sh
templates/view.html.sh

index fa0f5030c65a16b41f78abef38b228c050d49dac..ab46894708aa192a655a95af982f8f9f3f9402de 100755 (executable)
@@ -55,4 +55,4 @@ EOF
   rm ${_DATA}/cache/taglist_set ${_DATA}/cache/taglist_filter 2>/dev/null
 fi
 
-redirect "${HTTP_REFERER:-?i=&pn=${page}&s=${search}&f=${filter}&o=${order}#${info}}"
+redirect "${_POST[referrer]:-?i=&pn=${page}&s=${search}&f=${filter}&o=${order}#${info}}"
index 1fd907b4e7730993916e5a6b38e177aca4f06b23..55997cad1af59a60c1fc4a4a2c5e1b46a2f4e58c 100755 (executable)
@@ -48,4 +48,4 @@ elif [ -n "${_POST[osd]+x}" ]; then
   esac >"$fifofile"
 fi &
 
-redirect "$HTTP_REFERER"
+redirect "${_POST[referrer]}"
index 9707d6813e9ab3d0789b310a96258948d27d4b84..f9c27076de055239cc00986671cd08f67fce841c 100755 (executable)
@@ -13,4 +13,4 @@ set_cookie '+ 1 month' "fakemp4=${fakemp4}" HttpOnly
 set_cookie '+ 1 month' "watch=${watch}" HttpOnly
 set_cookie '+ 1 month' "pagesize=${pagesize}" HttpOnly
 
-redirect "$HTTP_REFERER"
+redirect "$_POST[referrer]"
index d530131c80557f447b320bcbbf735cf6946db729..e43beedb1966521d9b371bb8843ce281c3350b65 100755 (executable)
@@ -34,6 +34,7 @@ cat <<EOF
 
 <input type=radio name=topmenu id=btn_playctl><label for=btn_playctl>Audio</label>
 <form class="panel switchable top playctl" id="advctl" action="?action=playctl" method="post">
+  <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
   <fieldset class="volume">
     <button type="submit" name="amp" value="off">Amp Off</button>
     <button type="submit" name="amp" value="on">Amp On</button>
@@ -63,6 +64,7 @@ cat <<EOF
   <a href="$video">Download</a>
 
   <form action="?action=playctl" method="post" class="playctl">
+    <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
     <fieldset class="playback">
       <button type="submit" name="seek" value="-60">&lt;&lt;&lt;</button>
       <button type="submit" name="seek" value="-10">&lt;&lt;</button>
@@ -87,6 +89,7 @@ cat <<EOF
 </div>
 
 <form class="panel switchable bottom" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+  <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
   <input type="hidden" name="length" value="$length">
   <input type="hidden" name="width" value="$width">
   <input type="hidden" name="height" value="$height">
index 24e5df9cc12d68661be9eaf2431bb981d5d9d839..ab1cb8b6108617de598dc865f0a37fa7115221d1 100755 (executable)
@@ -45,6 +45,7 @@ cat <<EOF
       <input type="number" name="pagesize" value="${pagesize}" id="n_pagesize">
     </fieldset>
 
+    <input type="hidden" name="referrer" value="$(attribsafe ${REQUEST_URI})">
     <input type="submit" value="Set Cookie!">
   </form>
 EOF
index 4c3e85be7cdb84e772f1525561130c21f0c42894..8c22d6a6983fa61442b8883ae9e002b6114b210b 100755 (executable)
@@ -60,6 +60,7 @@ cat <<EOF
 </div>
 
 <form class="panel switchable bottom" id="tagger" action="?action=meta&${page_this}" method="post" accept-charset="UTF-8">
+  <input type="hidden" name="referrer" value="$(attribsafe "${REQUEST_URI}")">
   <input type="hidden" name="length" value="$length">
   <input type="hidden" name="width" value="$width">
   <input type="hidden" name="height" value="$height">