• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

修订版f0bebff4f15cb9bea1bf5e3864410fd2f3bd7041 (tree)
时间2011-02-10 08:05:53
作者Rick Copeland <rcopeland@geek...>
CommiterRick Copeland

Log Message

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

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

更改概述

差异

--- 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);