]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch '2018.12-rc' into task/6208-escape-html-true
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 18 Dec 2018 13:36:36 +0000 (08:36 -0500)
committerGitHub <noreply@github.com>
Tue, 18 Dec 2018 13:36:36 +0000 (08:36 -0500)
mod/newmember.php
mod/probe.php
mod/webfinger.php
src/Module/Feed.php
src/Module/Inbox.php
src/Util/HTTPSignature.php
view/theme/frio/templates/auto_request.tpl [new file with mode: 0644]
view/theme/frio/templates/contact_edit.tpl
view/theme/frio/templates/dfrn_request.tpl [new file with mode: 0644]
view/theme/frio/templates/settings/oauth_edit.tpl

index cd59cc780c23ccf7116cf90091ff49d3558b2d55..c2ffe6464ed3fd2c96ba0c079c69774953ca3d80 100644 (file)
@@ -8,7 +8,8 @@ use Friendica\Core\L10n;
 
 function newmember_content(App $a)
 {
-       $o = '<h1>' . L10n::t('Welcome to Friendica') . '</h1>';
+       $o = '<div class="generic-page-wrapper">';
+       $o .= '<h1>' . L10n::t('Welcome to Friendica') . '</h1>';
        $o .= '<h3>' . L10n::t('New Member Checklist') . '</h3>';
        $o .= '<div style="font-size: 120%;">';
        $o .= L10n::t('We would like to offer some tips and links to help make your experience enjoyable. Click any item to visit the relevant page. A link to this page will be visible from your home page for two weeks after your initial registration and then will quietly disappear.');
@@ -54,6 +55,7 @@ function newmember_content(App $a)
        $o .= '<li>' . '<a target="newmember" href="help">' . L10n::t('Go to the Help Section') . '</a><br />' . L10n::t('Our <strong>help</strong> pages may be consulted for detail on other program features and resources.') . '</li>' . EOL;
        $o .= '</ul>';
        $o .= '</div>';
+       $o .= '</div>';
 
        return $o;
 }
index b448ffd2b2e5938b139757226c4211a1afa0bb0f..7c41df8ac5de26f4a476020b12f5482f85e658f7 100644 (file)
@@ -15,7 +15,8 @@ function probe_content(App $a)
                killme();
        }
 
-       $o  = '<h3>Probe Diagnostic</h3>';
+       $o = '<div class="generic-page-wrapper">';
+       $o .= '<h3>Probe Diagnostic</h3>';
 
        $o .= '<form action="probe" method="get">';
        $o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . defaults($_GET, 'addr', '') . '" />';
@@ -30,6 +31,7 @@ function probe_content(App $a)
                $o .= str_replace("\n", '<br />', print_r($res, true));
                $o .= '</pre>';
        }
+       $o .= '</div>';
 
        return $o;
 }
index 01743f05b0660e8577de7495a999d31419ffeb05..a48d2dba6bac2634c0032a74ba238f5dfac8503b 100644 (file)
@@ -20,7 +20,8 @@ function webfinger_content(App $a)
                killme();
        }
 
-       $o  = '<h3>Webfinger Diagnostic</h3>';
+       $o = '<div class="generic-page-wrapper">';
+       $o .= '<h3>Webfinger Diagnostic</h3>';
 
        $o .= '<form action="webfinger" method="get">';
        $o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . defaults($_GET, 'addr', '') .'" />';
@@ -35,5 +36,7 @@ function webfinger_content(App $a)
                $o .= str_replace("\n", '<br />', print_r($res, true));
                $o .= '</pre>';
        }
+       $o .= '</div>';
+
        return $o;
 }
index 4c7059c038dc0bb221699f4c3840dcad3606f2bf..e5ebe2a4d66239e4551232fb68c49b3fe639e05a 100644 (file)
@@ -44,6 +44,7 @@ class Feed extends BaseModule
                        case 'posts':
                        case 'comments':
                        case 'activity':
+                               // Correct type names, no change needed
                                break;
                        case 'replies':
                                $type = 'comments';
@@ -53,8 +54,8 @@ class Feed extends BaseModule
                }
 
                $nickname = $a->argv[1];
-               header("Content-type: application/atom+xml");
+               header("Content-type: application/atom+xml; charset=utf-8");
                echo OStatus::feed($nickname, $last_update, 10, $type, $nocache, true);
-               killme();
+               exit();
        }
 }
index 25312bdf3af22caf43846ec65532ef4a5a391527..692e4043adce99f6fec85c4326a6b9ead51404cb 100644 (file)
@@ -9,6 +9,7 @@ use Friendica\Protocol\ActivityPub;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Util\HTTPSignature;
+use Friendica\Core\Logger;
 
 /**
  * ActivityPub Inbox
index 956d6ff3728d36b4d55a8b8abe4f81c406f636ce..07ff5e805d9b3293c921786d7ac195ac6ea02ff5 100644 (file)
@@ -204,6 +204,8 @@ class HTTPSignature
 
                if (preg_match('/algorithm="(.*?)"/ism', $header, $matches)) {
                        $ret['algorithm'] = $matches[1];
+               } else {
+                       $ret['algorithm'] = 'rsa-sha256';
                }
 
                if (preg_match('/headers="(.*?)"/ism', $header, $matches)) {
diff --git a/view/theme/frio/templates/auto_request.tpl b/view/theme/frio/templates/auto_request.tpl
new file mode 100644 (file)
index 0000000..9c737cf
--- /dev/null
@@ -0,0 +1,62 @@
+<div class="generic-page-wrapper">
+<h1>{{$header}}</h1>
+
+{{if $myaddr == ""}}
+<p id="dfrn-request-intro">
+{{$page_desc}}<br />
+<ul id="dfrn-request-networks">
+<li><a href="http://friendi.ca" title="{{$friendica}}">{{$friendica}}</a></li>
+<li><a href="https://diasporafoundation.org" title="{{$diaspora}}">{{$diaspora}}</a> {{$diasnote}}</li>
+<li><a href="https://gnu.io/social/" title="{{$statusnet}}" >{{$statusnet}}</a></li>
+</ul>
+</p>
+<p>
+{{$invite_desc}}
+</p>
+<p>
+{{$desc}}
+</p>
+{{/if}}
+
+{{if $request}}
+<form action="{{$request}}" method="post" />
+{{else}}
+<form action="dfrn_request/{{$nickname}}" method="post" />
+{{/if}}
+
+{{if $photo}}
+<img src="{{$photo}}" alt="" id="dfrn-request-photo">
+{{/if}}
+
+{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>{{/if}}
+{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
+{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
+{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
+
+<div id="dfrn-request-url-wrapper" >
+       <label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
+        {{if $myaddr}}
+                {{$myaddr}}
+                <input type="hidden" name="dfrn_url" id="dfrn-url" value="{{$myaddr|escape:'html'}}" />
+        {{else}}
+        <input type="text" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
+        {{/if}}
+        {{if $url}}
+                <input type="hidden" name="url" id="url" value="{{$url|escape:'html'}}" />
+        {{/if}}
+       <div id="dfrn-request-url-end"></div>
+</div>
+
+
+<div id="dfrn-request-info-wrapper" >
+
+</div>
+
+       <div id="dfrn-request-submit-wrapper">
+               {{if $submit}}
+                       <input class="btn btn-primary" type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{/if}}
+               <input class="btn btn-primary" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
+       </div>
+</form>
+</div>
\ No newline at end of file
index b0d201af63d90bbc827234667cfc31a152a02de0..8d9bd232a9527a8d478bb73a215b7da69a1866d7 100644 (file)
                                                {{if $poll_enabled}}
                                                        <li><div id="contact-edit-last-update-text">{{$lastupdtext}} <span id="contact-edit-last-updated">{{$last_update}}</span></div>
                                                        {{if $poll_interval}}
-                                                               <form id="contact-edit-poll-form" action="/contact/{{$contact_id}}" method="post"> 
-                                                                       <span id="contact-edit-poll-text">{{$updpub}}</span> {{$poll_interval}}
-                                                                       <input class="btn btn-primary" type="submit" name="submit" value="{{$submit}}" />
-                                                               </form>
+                                                               <span id="contact-edit-poll-text">{{$updpub}}</span> {{$poll_interval nofilter}}
+                                                               <input class="btn btn-primary" type="submit" name="submit" value="{{$submit" />
                                                        {{/if}}
                                                        </li>
                                                {{/if}}
diff --git a/view/theme/frio/templates/dfrn_request.tpl b/view/theme/frio/templates/dfrn_request.tpl
new file mode 100644 (file)
index 0000000..2f363f5
--- /dev/null
@@ -0,0 +1,92 @@
+<div class="generic-page-wrapper">
+<h1>{{$header}}</h1>
+
+{{if $myaddr}}
+{{else}}
+<p id="dfrn-request-intro">
+{{$page_desc}}<br />
+<ul id="dfrn-request-networks">
+<li><a href="http://friendi.ca" title="{{$friendica}}">{{$friendica}}</a></li>
+<li><a href="https://diasporafoundation.org" title="{{$diaspora}}">{{$diaspora}}</a> {{$diasnote}}</li>
+<li><a href="https://gnu.io/social/" title="{{$statusnet}}" >{{$statusnet}}</a></li>
+</ul>
+{{$invite_desc}}
+</p>
+<p>
+{{$desc}}
+</p>
+{{/if}}
+
+{{if $request}}
+<form action="{{$request}}" method="post">
+{{else}}
+<form action="dfrn_request/{{$nickname}}" method="post">
+{{/if}}
+
+{{if $photo}}
+<img src="{{$photo}}" alt="" id="dfrn-request-photo" />
+{{/if}}
+
+{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$zrl}}">{{$url}}</a></dd></dl>{{/if}}
+{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
+{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
+{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
+
+<div id="dfrn-request-url-wrapper" >
+       <label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
+       {{if $myaddr}}
+               {{$myaddr}}
+               <input type="hidden" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
+       {{else}}
+       <input type="text" name="dfrn_url" id="dfrn-url" size="32" value="{{$myaddr|escape:'html'}}" />
+       {{/if}}
+       {{if $url}}
+               <input type="hidden" name="url" id="url" value="{{$url|escape:'html'}}" />
+       {{/if}}
+       <div id="dfrn-request-url-end"></div>
+</div>
+
+<p id="dfrn-request-options">
+{{$pls_answer}}
+</p>
+
+<div id="dfrn-request-info-wrapper" >
+
+{{include file="field_yesno.tpl" field=$does_know_you}}
+<!--
+<p id="doiknowyou">
+{{$does_know}}
+</p>
+
+               <div id="dfrn-request-know-yes-wrapper">
+               <label id="dfrn-request-knowyou-yes-label" for="dfrn-request-knowyouyes">{{$yes}}</label>
+               <input type="radio" name="knowyou" id="knowyouyes" value="1" />
+
+               <div id="dfrn-request-knowyou-break" ></div>
+               </div>
+               <div id="dfrn-request-know-no-wrapper">
+               <label id="dfrn-request-knowyou-no-label" for="dfrn-request-knowyouno">{{$no}}</label>
+               <input type="radio" name="knowyou" id="knowyouno" value="0" checked="checked" />
+
+               <div id="dfrn-request-knowyou-end"></div>
+               </div>
+-->
+
+<p id="dfrn-request-message-desc">
+{{$add_note}}
+</p>
+       <div id="dfrn-request-message-wrapper">
+       <textarea name="dfrn-request-message" rows="4" cols="64" ></textarea>
+       </div>
+
+
+</div>
+
+       <div id="dfrn-request-submit-wrapper">
+               {{if $submit}}
+                       <input class="btn btn-primary" type="submit" name="submit" id="dfrn-request-submit-button" value="{{$submit|escape:'html'}}" />
+               {{/if}}
+               <input class="btn btn-primary" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel|escape:'html'}}" />
+       </div>
+</form>
+</div>
\ No newline at end of file
index 477adf77c799ea03e9b5139ef23e2413dfeef2c0..419e1b203fe2b2c1bf387a76bee27c78ac9d9dd4 100644 (file)
@@ -1,4 +1,4 @@
-
+<div class="generic-page-wrapper">
 <h2 class="heading">{{$title}}</h2>
 
 <form method="POST">
@@ -16,3 +16,4 @@
        <div class="clear"></div>
 
 </form>
+</div>
\ No newline at end of file