Re: A way to find dead links for external pages

2016-01-07 Thread Paul Uszak
What security issues does this present?

Remember, the link targets have been selected by the wiki authors so they
are desirable links rather than spam.  I can't quite see a threat model if
all you're doing is reporting a HTTP status code.  Isn't this what search
engines do by default?

On 4 January 2016 at 06:27, Derek Hohls  wrote:

> There seem to be any number of tools out there... have you seen:
> https://wummel.github.io/linkchecker/
> (showing my bias towards Python)
>
> >>> Foster Schucker  12/28/15 8:39 PM >>>
> Thanks. I didn't think there was a way in JSPWiki to do that. I was on
> the look for a tool that was smart enough to do the walk and only report
> back on external sites/links. I figured with the number of people on
> this list that do that I could get a quick recommendation of a tool that
> someone liked.
>
> Thanks!
>
> Foster
> On Mon, 28 Dec 2015 19:09:43 +0100, Harry Metske
>  wrote:
>
> There has been a discussion about this before:
> https://issues.apache.org/jira/browse/JSPWIKI-330
>
> We considered it a security risk and did not implement it.
>
> kind regards,
> Harry
>
>
> On 28 December 2015 at 16:14, Foster Schucker 
> wrote:
>
> > I have a wiki that ties into external sites. As these places
> switch to
> > new platforms the old links die. (Or they die due to refactoring).
> >
> > Anyway I'm looking for a way to walk the wiki pages and see if
> there is a
> > 200 response back from the other side. I'm guessing one of you
> have had to
> > do this before, no sense in reinventing the wheel.
> >
> > In a perfect world it would spit out [PageName] URL ResponseCode
> for each
> > URL (that would let me catch other errors like forbidden, etc.
> but I'd be
> > happy to get the ones that don't produce a 200.
> >
> > Thanks!
> > Foster
> >
> >
>
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean.
>
> Please consider the environment before printing this email.
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
>
> This message has been scanned for viruses and dangerous content by
> *MailScanner* ,
> and is believed to be clean.
>
>
> Please consider the environment before printing this email.
>
>


Re: Where are "Set" values stored?

2016-01-07 Thread Juan Pablo Santos Rodríguez
Hi Foster,

that information is stored at WikiPage level, as an attribute; you can
reach it through org.apache.wiki.WikiPage#getAttribute( String ) method.
You can see an example of use on the SpamFilter, specifically on the
refreshBlacklists method (take a look first to the javadocs class to see
what it is looking for).


HTH,
juan pablo

On Tue, Jan 5, 2016 at 2:43 AM, Foster Schucker  wrote:

> From the docs:
> You can use the "SET" directive to define a variable that exists only in
> the page.
>
> For example:
>
>   [{SET  foo='bar'}]
>
> creates a variable called "foo", which has the value of "bar". You can
> access this value anywhere on your page by using the shorthand "[{$foo}]".
>
> Where are these values stored?  I'm hoping in a session variable.
>
> ---
> Back story.  A while ago I built a plugin to let me put Judoscript into a
> page.  This gave me the ability to go get page data from other places (like
> make a call to get a stock price or weather data) .  So I was able to
> scrape data.   I'd like to be able to do a book lookup by ISBN number and
> get the results back that I can parse  (see this as an example
> http://www.isbnsearch.org/isbn/9781465043221)
>
> I'd like to be able to do a [{SET ISBN=9781465043221] and then use
> [{INSERTPAGE BookInfo}]  the BookInfo is the page that has the Judoscript
> on it, it would do the call, format the information.  But I need to have
> access to the variables that are SET.
>
> Thanks!
> Foster
>
> (Plan B would be to write a plugin that takes the ISBN number and then
> sets variables like Title, Author, Pages, etc and let the page deal with it
> that way. )
>
>
>