• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

Révisionf0bebff4f15cb9bea1bf5e3864410fd2f3bd7041 (tree)
l'heure2011-02-10 08:05:53
AuteurRick Copeland <rcopeland@geek...>
CommiterRick Copeland

Message de Log

[#1478] Fix problem with MD preview (CSRF failure)

Signed-off-by: Rick Copeland <rcopeland@geek.net>

Change Summary

Modification

--- a/Allura/allura/lib/widgets/resources/js/sf_markitup.js
+++ b/Allura/allura/lib/widgets/resources/js/sf_markitup.js
@@ -11,10 +11,12 @@ $(window).load(function() {
1111 var $help_area = $('div.markdown_help', $container);
1212 $preview.click(function(evt){
1313 evt.preventDefault();
14+ var cval = $.cookie('_session_id');
1415 $.post('/nf/markdown_to_html', {
1516 markdown:$textarea.val(),
1617 project:$('input.markdown_project', $container).val(),
17- app:$('input.markdown_app', $container).val()
18+ app:$('input.markdown_app', $container).val(),
19+ _session_id:cval
1820 },
1921 function(resp){
2022 $preview_area.html(resp);